Re: PHP CGI mode and command line variables
| From: | Chris Shiflett | Date: | Thu, 24 Jul 2003 04:33:27 +0000 |
| Subject: | Re: PHP CGI mode and command line variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156596@lists.php.net to get a copy of this message | ||
--- CDitty <mail@redhotsweeps.com> wrote:
> I have written a script that runs fine when I run it via the
> command line. However, when I tack on variables to the command
> line, I get an error.
>
> This works.....
> php -q ./import.php
>
> This doesn't
> php -q ./import.php?feed=eastwood
I might be wrong, but I don't think it's possible to simulate GET or POST from
the command line like that. I always have a "shell script" perspective and pass
things in as arguments like this:
./import.php --feed=eastwood
Of course, if it's under document root, you can test from the command line
using wget.
Hope that helps.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/