note 80043 added to migration5.incompatible

From: Date: Wed, 26 Dec 2007 15:01:21 +0000
Subject: note 80043 added to migration5.incompatible
Groups: php.notes 
Request: Send a blank email to php-notes+get-134018@lists.php.net to get a copy of this message
I had trouble with passing the variables from the command line. I used to do it simply by sending them smt like: php.exe filename.php firstvar=firstval secondvar=secondval and reaping them through $_GET["firstvar"], $_GET["secondvar"] and this elasticity allowed me to run the script without having anything to change either from the command line as quoted above, or from the browser interface through: localhost/filename.php?firstvar=firstval&secondvar=secondval But PHP 5 just collects them in $_SERVER["argv"] array. And it differs whether you use the command line or the browser interface. I solved this problem via the following procedure: //For command line variable passing: for($i=1;$i<sizeof($_SERVER["argv"]);$i++) { list($var0,$val0) = explode("=",$_SERVER["argv"][$i]); $_GET[$var0] = $val0; } ---- Server IP: 83.137.20.135 Probable Submitter: 145.94.112.21 ---- Manual Page -- http://www.php.net/manual/en/migration5.incompatible.php Edit -- https://master.php.net/note/edit/80043 Del: integrated -- https://master.php.net/note/delete/80043/integrated Del: useless -- https://master.php.net/note/delete/80043/useless Del: bad code -- https://master.php.net/note/delete/80043/bad+code Del: spam -- https://master.php.net/note/delete/80043/spam Del: non-english -- https://master.php.net/note/delete/80043/non-english Del: in docs -- https://master.php.net/note/delete/80043/in+docs Del: other reasons-- https://master.php.net/note/delete/80043 Reject -- https://master.php.net/note/reject/80043 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134018) next »