Monday, February 05, 2007

Difference between $PHP_SELF and $_SERVER['PHP_SELF']

Just got a good article about this:
Understanding $_SERVER[’PHP_SELF’], $PHP_SELF, $_SERVER[’REQUEST_URI’] and $_SERVER[’SCRIPT_NAME’] in PHP and when to use what .
Basically, $PHP_SELF is deprecated and should not be used because it will not work without register_globals being enabled. As of PHP 4.2.0 the default for the PHP directive register_globalswent from on to off.

No comments: