Passing arguments on the commandline
Posted: Wed Jul 10, 2002 5:05 am
I want to pass some arguments to a PHP script from the commandline.
The code looks like this:
When I run it I get the following result:
Am I doing something wrong here?
Paul
The code looks like this:
Code: Select all
<$php
$param = $argvї1];
echo $param;
?>Code: Select all
E:\PHP>php -f "m:\reportnt.php" Thisisaparameter
PHP Notice: Undefined variable: argv in m:\reportnt.php on line 24
E:\PHP>Paul