Date: 01/21/00
- Next message: Philip Strnad: "Re: [PHPLIB] IE4 crcloginform error"
- Previous message: M <email protected>: "[PHPLIB] Installation problem"
- In reply to: Roman Kalenjuk: "[PHPLIB] Arguments to PHP script."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
GET method is essentially a descendant of command line processing, while
POST uses stdin. The following is my recollection from the distant past so
it's probably not quite correct.
I can't recall exactly, but for GET, I think you can either put the
variables in your environment, like so (csh):
set myvar=42
set another=hello
somefile.php3
(assuming you have #!/path/to/php in your script and it's executable)
or (unsure of the exact syntax - you might need '' around the args)
php somefile.php3 myvar=42 another=hello
You can use POST like this:
somefile.php3 << EOF
myvar=42
another=hello
EOF
Gary B
RK said,
> I've got a copy of PHP, compiled as CGI binary. Very useful I must say, I can
> run and debug my scripts from Unix shell.
>
> The matter is I can't pass command line arguments to
> PHP script. May be someone could help me with this issue?
>
> How can I access them from the script?
>
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Philip Strnad: "Re: [PHPLIB] IE4 crcloginform error"
- Previous message: M <email protected>: "[PHPLIB] Installation problem"
- In reply to: Roman Kalenjuk: "[PHPLIB] Arguments to PHP script."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

