RE: [PHP] Register Globals

From: Date: Mon, 21 Jul 2003 12:22:51 +0000
Subject: RE: [PHP] Register Globals
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156050@lists.php.net to get a copy of this message
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

« previous php.general (#156050) next »