Getting argv[1] using php-cgi
Posted: Thu Mar 15, 2007 10:49 am
From the command prompt in windows, if I run ‘php.exe test.php arg1’ from the CLI I can retrieve arg1 using $argv[1] inside of test.php
However, if I run ‘php-cgi.exe test.php arg1’ I get the error ‘Undefined index: argv’
What is the proper way to retrieve args from inside your php code using php-cgi.exe?
However, if I run ‘php-cgi.exe test.php arg1’ I get the error ‘Undefined index: argv’
What is the proper way to retrieve args from inside your php code using php-cgi.exe?