atholon Posted September 23, 2008 Share Posted September 23, 2008 Anyone know how to get an absolute path automatically with PHP? Quote 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'] Quote 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 Quote 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']; Quote 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? Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/125387-paths/#findComment-648308 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.