04-18-2009, 01:26 AM
|
#21 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Kalle
$_SERVER is a superglobal, that means when you update a value it will reflect all scopes:
PHP Code:
<?php
expose_phpself();
$_SERVER['PHP_SELF'] = '/this/is/a/custom/value';
expose_phpself();
function expose_phpself()
{
echo($_SERVER['PHP_SELF'] . PHP_EOL);
}
?>
(as if I understood your question correctly :))
|
Ok I get it. I'll try to remember from now on.
I didn't realize setting a $_SERVER variable affects throughout the entire site as well as other scripts calling it....
|
|
|
|