atholon Posted September 23, 2008 Share Posted September 23, 2008 Anyone know how to get an absolute path automatically with PHP? Link to comment https://forums.phpfreaks.com/topic/125387-paths/ Share on other sites More sharing options...
F1Fan Posted September 23, 2008 Share Posted September 23, 2008 $_SERVER['DOCUMENT_ROOT'] Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648259 Share on other sites More sharing options...
atholon Posted September 23, 2008 Author Share Posted September 23, 2008 Sorry I mean like http://mydomain.com/thisdir/her/index.html Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648261 Share on other sites More sharing options...
Zane Posted September 23, 2008 Share Posted September 23, 2008 echo "http://" . $_SERVER['SERVER_NAME'] . "/" . $_SERVER['PHP_SELF']; Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648267 Share on other sites More sharing options...
atholon Posted September 23, 2008 Author Share Posted September 23, 2008 Ok thanks. I have a problem that I use a script that is called global_placeholders.php which is included in many other files in other directories this file also includes the SMF SSI.php page. Now I need to know what is the best way to handle this because for each folder change it is going to say that it cannot find the SSI.php file. The only solution that I could think of is to put that includes statement on every page. Any ideas? Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648291 Share on other sites More sharing options...
atholon Posted September 23, 2008 Author Share Posted September 23, 2008 Wrong place Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648308 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.