note 82583 deleted from reserved.variables by nlopess

From: Date: Sun, 20 Apr 2008 11:46:30 +0000
Subject: note 82583 deleted from reserved.variables by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-138574@lists.php.net to get a copy of this message
Note Submitter: azmeerm at gmail dot com ---- I wanted to know the current file name; and was breaking my head to figure out why I'm getting a NULL for both $PHP_SELF and $_SESSION["PHP_SELF"] and even for $_SESSION["SCRIPT_NAME"]. tried with 2 UNIX servers with no luck. But when I used $_ENV["SCRIPT_NAME"] it worked !! so here's a little snippet to find out what works. echo "Current location= ".$PHP_SELF."<br>"; echo "Current location= ".$_SESSION["SCRIPT_NAME"]."<br>"; echo "Current location= ".$_SESSION["PHP_SELF"]."<br>"; echo "Current location= ".$_ENV["SCRIPT_NAME"]."<br>";

« previous php.notes (#138574) next »