TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-18-2009, 01:26 AM   #21 (permalink)
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
Old 04-18-2009, 12:31 PM   #22 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
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....
Same thing goes for $_POST, $_GET and $_REQUEST for example
__________________
Tanax is offline  
Reply With Quote
The Following User Says Thank You to Tanax For This Useful Post:
allworknoplay (04-18-2009)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timezone Class: Dealing with Timezones the Proper Way Wildhoney General 2 01-10-2011 10:01 PM
How to create a gallery class Tanax Advanced PHP Programming 22 06-23-2009 11:36 PM
Part 2: Giving our Currency Conversion Script some Responsibility Wildhoney General 15 03-17-2009 01:53 PM
[Tutorial] How to organize your classes | Part 1 Tanax Advanced PHP Programming 10 03-01-2009 09:08 PM
Advance Pagination Class Rendair Advanced PHP Programming 9 12-13-2007 08:28 AM


All times are GMT. The time now is 08:59 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design