httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gben...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/htdocs/php arg.php func5.php var1.php var2.php var3.php
Date Wed, 22 May 2002 12:24:04 GMT
gbenson     02/05/22 05:24:04

  Modified:    perl-framework/t/htdocs/php arg.php func5.php var1.php
                        var2.php var3.php
  Log:
  Fix breakages when register_globals is off in php.ini
  
  Revision  Changes    Path
  1.2       +2 -2      httpd-test/perl-framework/t/htdocs/php/arg.php
  
  Index: arg.php
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/htdocs/php/arg.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- arg.php	30 Jul 2001 19:37:14 -0000	1.1
  +++ arg.php	22 May 2002 12:24:04 -0000	1.2
  @@ -1,5 +1,5 @@
   <?php
  -        for($i=0;$i<$argc;$i++) {
  -                echo "$i: ".$argv[$i]."\n";
  +	for($i=0;$i<$HTTP_SERVER_VARS["argc"];$i++) {
  +                echo "$i: ".$HTTP_SERVER_VARS["argv"][$i]."\n";
           }
   ?>
  
  
  
  1.5       +1 -1      httpd-test/perl-framework/t/htdocs/php/func5.php
  
  Index: func5.php
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/htdocs/php/func5.php,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- func5.php	10 Sep 2001 18:06:55 -0000	1.4
  +++ func5.php	22 May 2002 12:24:04 -0000	1.5
  @@ -1,6 +1,6 @@
   <?php
   
  -$file = $argv[0];
  +$file = $HTTP_SERVER_VARS["argv"][0];
   
   function foo()
   {
  
  
  
  1.2       +12 -1     httpd-test/perl-framework/t/htdocs/php/var1.php
  
  Index: var1.php
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/htdocs/php/var1.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- var1.php	30 Jul 2001 19:37:14 -0000	1.1
  +++ var1.php	22 May 2002 12:24:04 -0000	1.2
  @@ -1 +1,12 @@
  -<?php echo $variable?>
  +<?php
  +	switch ($HTTP_SERVER_VARS["REQUEST_METHOD"]) {
  +	case "GET":
  +		echo $HTTP_GET_VARS["variable"];
  +		break;
  +	case "POST":
  +		echo $HTTP_POST_VARS["variable"];
  +		break;
  +	default:
  +		echo "ERROR!";
  +	}
  +?>
  
  
  
  1.2       +14 -1     httpd-test/perl-framework/t/htdocs/php/var2.php
  
  Index: var2.php
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/htdocs/php/var2.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- var2.php	30 Jul 2001 19:37:14 -0000	1.1
  +++ var2.php	22 May 2002 12:24:04 -0000	1.2
  @@ -1 +1,14 @@
  -<?php echo "$v1 $v2"?>
  +<?php
  +	switch ($HTTP_SERVER_VARS["REQUEST_METHOD"]) {
  +	case "GET":
  +		echo join(" ", array($HTTP_GET_VARS["v1"],
  +				     $HTTP_GET_VARS["v2"]));
  +		break;
  +	case "POST":
  +		echo join(" ", array($HTTP_POST_VARS["v1"],
  +				     $HTTP_POST_VARS["v2"]));
  +		break;
  +	default:
  +		echo "ERROR!";
  +	}
  +?>
  
  
  
  1.2       +16 -1     httpd-test/perl-framework/t/htdocs/php/var3.php
  
  Index: var3.php
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/htdocs/php/var3.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- var3.php	30 Jul 2001 19:37:14 -0000	1.1
  +++ var3.php	22 May 2002 12:24:04 -0000	1.2
  @@ -1 +1,16 @@
  -<?php echo "$v1 $v2 $v3"?>
  +<?php
  +	switch ($HTTP_SERVER_VARS["REQUEST_METHOD"]) {
  +	case "GET":
  +		echo join(" ", array($HTTP_GET_VARS["v1"],
  +				     $HTTP_GET_VARS["v2"],
  +				     $HTTP_GET_VARS["v3"]));
  +		break;
  +	case "POST":
  +		echo join(" ", array($HTTP_POST_VARS["v1"],
  +				     $HTTP_POST_VARS["v2"],
  +				     $HTTP_POST_VARS["v3"]));
  +		break;
  +	default:
  +		echo "ERROR!";
  +	}
  +?>
  
  
  

Mime
View raw message