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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get the curent page

Status
Not open for further replies.

z3phir

Programmer
Dec 15, 2002
16
RO
hi ! i need a function or something to get the page i'm on so that i can pass it in a variable inside a form. i know that referrer dosen't work too good so i want to try using a var. how do i do that or if someone has a better ideea i would be glad to hear it. 10x in advance
 
__FILE__ gets the entire path and filename

$_SERVER['SCRIPT_NAME'] gets the relative path from the document root
 
Code:
basename($_SERVER['SCRIPT_NAME'])


--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
I'd suggest just $PHP_SELF it's just the file name, no paths.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top