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 Quote Link to comment 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... Quote Link to comment 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> Quote Link to comment 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']); Quote Link to comment Share on other sites More sharing options...
clearstatcache Posted July 18, 2007 Share Posted July 18, 2007 dats wat im about to post....hihihihi Quote Link to comment 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.