spamoom Posted July 18, 2007 Share Posted July 18, 2007 I have a file called index.php (localhost/blabla/index.php), and my mind has just gone blank and I cant remember how to get the file path without the file info... for example I need to get localhost/blabla/ I am sure it is using $_SERVER but which argument =/ Thanks SpaM Link to comment https://forums.phpfreaks.com/topic/60510-solved-cant-remember-this-_server/ Share on other sites More sharing options...
clearstatcache Posted July 18, 2007 Share Posted July 18, 2007 to get the path.... $path = dirname(localhost/blabla/index.php); hope ds help... Link to comment https://forums.phpfreaks.com/topic/60510-solved-cant-remember-this-_server/#findComment-301015 Share on other sites More sharing options...
paul2463 Posted July 18, 2007 Share Posted July 18, 2007 have a look here at the <a href="http://uk2.php.net/reserved.variables"> MANUAL </a> Link to comment https://forums.phpfreaks.com/topic/60510-solved-cant-remember-this-_server/#findComment-301018 Share on other sites More sharing options...
spamoom Posted July 18, 2007 Author Share Posted July 18, 2007 Thanks Very much guys Managed to solve it with $filepath = dirname($_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']); Link to comment https://forums.phpfreaks.com/topic/60510-solved-cant-remember-this-_server/#findComment-301020 Share on other sites More sharing options...
clearstatcache Posted July 18, 2007 Share Posted July 18, 2007 dats wat im about to post....hihihihi Link to comment https://forums.phpfreaks.com/topic/60510-solved-cant-remember-this-_server/#findComment-301023 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.