Search found 1 match
- Thu Mar 15, 2007 10:49 am
- Forum: PHP - Code
- Topic: Getting argv[1] using php-cgi
- Replies: 2
- Views: 670
Getting argv[1] using php-cgi
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-cg...