Page 1 of 1
\"$PHP_SELF\" <----- Need some help with that.
Posted: Tue May 31, 2005 9:55 pm
by darkstarskaterboy
What is this, what does it do, anything that you could tell me would be helpful.
Posted: Tue May 31, 2005 9:57 pm
by Skara
$PHP_SELF is a predefined variable that contains filename of the current running script.
In the addy "
http://example.com/example.php", $PHP_SELF would contain "/example.php"
"
http://example.com/folder/another.php" => "/folder/another.php"
"
http://example.com/again.php#anchor" => "/again.php"
"
http://example.com/yetagain.php?var=1" => "/yetagain.php" (I think)
Posted: Tue May 31, 2005 9:59 pm
by John Cartwright
Basically it is mainly used for portability purposes. For example, as shown in the form above, that would work on any server instead of having to manually changed it every time.
I dont' know where it is defined though.
Posted: Tue May 31, 2005 10:03 pm
by darkstarskaterboy
I can't find where it is defined,, so i don't know what it is, so it is giving me an error.
Posted: Tue May 31, 2005 10:11 pm
by John Cartwright
take a look at
take a look over at PHP_SELF