Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path Question

Status
Not open for further replies.

rjseals

Technical User
Nov 25, 2002
63
US
Quick question. I want to be able to basically get the current directory without the actual file.

For instance if I have this code in a file in the level3 folder:

echo $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];

I get something to this effect
/srv/
What I want is the above path minus the index.php

Any ideas?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top