Re: [PHP] How to give parameters to a console php-script?

2003-01-02 Thread David Yee
ED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 5:40 AM Subject: [PHP] How to give parameters to a console php-script? > Hello! > > I start a console app with > > php myscript.php4 (just prints "ok"). > > How can I give parameters to it? I tri

Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
> Martin, > Ah yes, the famous 'read the upgrade notes - gotcha'! > Well done, you figured it out... > =dn Thanx for your help, it pointed me in the right direction ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread DL Neil
Martin, Ah yes, the famous 'read the upgrade notes - gotcha'! Well done, you figured it out... =dn > ll I found a > register_argc_argv = On > > in my php.ini, which should work then. But I also found, that I have to use > > print "Ok: ".$_SERVER["argv"][1]; > > instead of > print "Ok: ".$argv[1];

Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
ll I found a register_argc_argv = On in my php.ini, which should work then. But I also found, that I have to use print "Ok: ".$_SERVER["argv"][1]; instead of print "Ok: ".$argv[1]; Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
Hi, > What do argv and argc tell you? > Is the php.ini file set up so that these variables are shown/valid? "Undefined variable: argv" - so I guess this is the problem ;-) What do I have to change in the php.ini? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How to give parameters to a console php-script?

2002-12-02 Thread DL Neil
Hello Martin, > I start a console app with > > php myscript.php4 (just prints "ok"). > > How can I give parameters to it? I tried: > php myscript.php4 myparameter > php myscript.php4?myparameter > php myscript.php4?param=myparameter > > But always php just returns without doing nothing (not eve

[PHP] How to give parameters to a console php-script?

2002-12-02 Thread Martin Thoma
Hello! I start a console app with php myscript.php4 (just prints "ok"). How can I give parameters to it? I tried: php myscript.php4 myparameter php myscript.php4?myparameter php myscript.php4?param=myparameter But always php just returns without doing nothing (not even giving an error or printi