Hey there,
We would like to use the variables argc and argv. The problem is that argc
always has the value 1, whether we pass no, one, two or more parameters. And
in the array argv there is only the name of the program.
We are working on a computer with Windows 2000 and a local installation of
PHP on it. The global variable register_argc_argv is set to Local Value: ON
and Master Value: ON. We've tried it with PHP 4.0.6 and PHP 4.2.3.
Here's the source and the output of the test program:
program source (test1.php):
===========================
<?php
echo "Commandline - Parameter\n\n";
$x = $argc;
print("Result (value of argc): $x\n");
?>
command line:
=============
case 1 (without parameters) - OK:
---------------------------------
C:\>test1.php
X-Powered-By: PHP/4.0.6
Content-type: text/html
Commandline - Parameter
Result (value of argc): 1
case 2 (with 2 parameters) - NOT OK:
------------------------------------
C:\>test1.php param1 param2
X-Powered-By: PHP/4.0.6
Content-type: text/html
Commandline - Parameter
Result (value of argc): 1
Does anyone know why this doesn't work? Or what the problem is?
Thanks in advance!
Michael and Christian
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php