I have a question about using php from the command line.
I want to be able to call the php interpreter from the command line and pass values from the query string to the script.
Say I want to test a page that needs a session id to generate properly. From the browser I type in
how can I get the session_id to be recognized by my script that expects the variable to be instantiated when it parses the query string?
I've tried setting the QUERY_STRING environment variable and then running php (at least in windows) and that doesn't seem to work.
c:> set QUERY_STRING id=12345
c:> php.exe myscript.php
I've tried passing variables as additional arguments (which seems the most intuitive to me)
c:> php.exe myscript.php session_id=12345
There has to be an easy way to do this. Anyone know how?