[PHP-CVS] cvs: php4(PHP_4_2_0) /tests/basic 011.phpt
by Marcus Börger other posts by this author
Aug 29 2002 9:36AM messages near this date
[PHP-CVS] cvs: php4 /main php_ini.c
|
[PHP-CVS] cvs: php4 /ext/standard info.c
helly Thu Aug 29 05:36:20 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/tests/basic 011.phpt
Log:
MFH (not with cli)
Index: php4/tests/basic/011.phpt
diff -u php4/tests/basic/011.phpt:1.2 php4/tests/basic/011.phpt:1.2.2.1
--- php4/tests/basic/011.phpt:1.2 Tue Oct 23 07:11:29 2001
+++ php4/tests/basic/011.phpt Thu Aug 29 05:36:19 2002
@@ -1,21 +1,22 @@
--TEST--
-Testing $argc and $argv handling
+Testing $argc and $argv handling (GET)
--SKIPIF--
-<?php if(ini_get('register_argc_argv') == '') echo 'skip'; ?>
+<?php if (ini_get('register_argc_argv')=='' || php_sapi_name()=='cli') echo 'skip'; ?>
--POST--
--GET--
ab+cd+ef+123+test
--FILE--
<?php
- if(ini_get('register_globals') != '') {
- for($i=0;$i<$argc;$i++) {
- echo "$i: ".$argv[$i]."\n";
- }
- } else {
- for($i=0;$i<$_SERVER['argc'];$i++) {
- echo "$i: ".$_SERVER['argv'][$i]."\n";
- }
- }
+
+if (!ini_get('register_globals')) {
+ $argc = $_SERVER['argc'];
+ $argv = $_SERVER['argv'];
+}
+
+for ($i=0; $i<$argc; $i++) {
+ echo "$i: ".$argv[$i]."\n";
+}
+
?>
--EXPECT--
0: ab
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|