RE: [PHP] Register Globals
| From: | Petre Agenbag | Date: | Mon, 21 Jul 2003 12:29:59 +0000 |
| Subject: | RE: [PHP] Register Globals | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156051@lists.php.net to get a copy of this message | ||
a simple extract($_POST) or extract($_GET) would also work
On Mon, 2003-07-21 at 14:22, stfmoreau wrote:
> Hi,
>
> include this code in your header file :
> // _GET
> if (isset($_GET))
> while (list($key, $val) = each($_GET))
> {
> eval ("$".$key." = '".$val."';");
> }
> // _POST
> if (isset($_POST))
> while (list($key, $val) = each($_POST))
> {
> eval ("$".$key." = '".$val."';");
> }
> // _SESSION
> if (isset($_SESSION))
> while (list($key, $val) = each($_SESSION))
> {
> eval ("$".$key." = '".$val."';");
> }
> It may works (I have not expirimence it)
>
> Stf
>
> -----Message d'origine-----
> De : Daryl Meese [mailto:darylm@magiasoftware.com]
> Envoyé : lundi 21 juillet 2003 14:18
> À : php-general@lists.php.net
> Objet : [PHP] Register Globals
>
>
> I would like to rewrite my scripts to work when register globals is off.
> The problem is that my scripts encompass several thousand files. Does
> anyone have any suggestions for an effective tool to help in this process?
>
> Daryl Meese
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>