MrFish Posted December 12, 2009 Share Posted December 12, 2009 I'm trying to make my subdirectory access javascript and php files located on my www directory.The subdirectory:luminary.mysitename.netfiles I need:mysitename.net/js/index.jsandmysitename.net/subdomain/index.phpI've tried $_SERVER["DOCUMENT_ROOT"] but it returned the root of my subdomain ("home/[sitename]/public_html/luminary/subdomain/index.php"). How can I take a step backwards into my www directory and go from there to get files from the subdomain folder and such? ("home/[sitename/public_html/subdoamin/index.php]" I believe). Link to comment Share on other sites More sharing options...
justsomeguy Posted December 14, 2009 Share Posted December 14, 2009 You can use ".." to refer to a parent directory, or you can keep using the dirname function to keep doing up one level. e.g.:dirname(dirname(dirname($_SERVER['DOCUMENT_ROOT']))); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.