View Single Post
Old 04-18-2009, 01:26 AM   #21 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Kalle View Post
$_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....
allworknoplay is offline  
Reply With Quote