note 66244 added to security.globals

From: Date: Wed, 17 May 2006 14:39:03 +0000
Subject: note 66244 added to security.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-111508@lists.php.net to get a copy of this message
If you are in the need to turn register_globals on and are not allowed to (e.g. legacy-code in php 6?), you may include the following line at the top of your files: <?php $keys = array_keys($_GET); for ($i = 0; $i < count($keys); $i++) $$keys[$i] = $_GET[$keys[$i]]; ?> this sets all http-get variables as PHP-variables. Regards Rolf ---- Server IP: 66.163.161.117 Probable Submitter: 84.141.213.220 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/security.globals.php Edit -- http://master.php.net/note/edit/66244 Del: integrated -- http://master.php.net/note/delete/66244/integrated Del: useless -- http://master.php.net/note/delete/66244/useless Del: bad code -- http://master.php.net/note/delete/66244/bad+code Del: spam -- http://master.php.net/note/delete/66244/spam Del: non-english -- http://master.php.net/note/delete/66244/non-english Del: in docs -- http://master.php.net/note/delete/66244/in+docs Del: other reasons-- http://master.php.net/note/delete/66244 Reject -- http://master.php.net/note/reject/66244 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111508) next »