How to set GET and POST variables through CLI?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I'd like to use the command line interface to test my php files before I put them live. However I can't figure out how to pass variables so the php program sees them as if they came in via an HTTP GET request.

For example, if the url would be this on the server:
	http://some.server.com/mypage.php?parm1=Hello&parm2=Goodbye
and in mypage.php I do something like this:
	$echo $_GET["parm1"];
then how do I test this via the PHP command line?

Am I missing something simple?  I tried this but it doesn't work:
	php.exe -f mypage.php -- parm1=Hello parm2=Goodbye

Thanks for any help.
-- Steve

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux