$_SERV array and warning messages.
Posted: Wed Jul 17, 2002 11:01 am
Hey people,
I've been doing a good share of batch scripting and work with PHP as a server lately. One of the things I've noticed is that I can't just use $argc / $argv. But, I can use $_SERV[argc] / $_SERV[argv]. However, I am encountering issues even with this. For example....
.... causes the script to blow up with "... parse error, unexpected '[', expecting ']'..... Now if argv is an array of command line arguments, then shouldn't the above be correct? As well, if I use...
.... it blows up even faster with a "... use of undefined constant argv - assumed 'argv' ...."
Now I've been able to deal with the above with this code here.
However, I get the feeling this isn't the best code in the world. Anybody else have any comment or experience along these lines?
Later on,
BDKR
I've been doing a good share of batch scripting and work with PHP as a server lately. One of the things I've noticed is that I can't just use $argc / $argv. But, I can use $_SERV[argc] / $_SERV[argv]. However, I am encountering issues even with this. For example....
Code: Select all
echo "$_SERVERїargvї1]]\n";Code: Select all
echo $_SERVERїargv]ї1];Now I've been able to deal with the above with this code here.
Code: Select all
@$argc = $_SERVERїargc];
@$argv = $_SERVERїargv];Later on,
BDKR