Re: Forms and PHP_SELF

From: Date: Sun, 06 Jul 2003 01:15:00 +0000
Subject: Re: Forms and PHP_SELF
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-154101@lists.php.net to get a copy of this message
Dan Anderson wrote:
Be careful when using PHP self. Not all servers support it. If you're planning on using this script over and over on multiple servers you may find creating a variable is helpful. $some_variable = "the_script_name.php"; Then, where you would use PHP_SELF just echo (or whatever) $some_variable. You will have to change it if the script name changes, but otherwise it's just a relative path. Please don't mislead users! That's plain untrue. You're correct that not all servers have register_globals on, so use $HTTP_SERVER_VARS['PHP_SELF'].
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#154101) next »