i have some scripts that need GET and POST values to start, and i wanna test them over shell.
Is there some way to pass the values to that arrays to avoid using getenv() function?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if your main goal is just to test from the command line, I would use the wget command and just call your script with the query string (for GET) and pass post data using the
--post-data=stringparameter of wget (for POST).If your goal is to not use a webserver at all for testing for some reason, I’d recommend using a wrapper and encapsulating your access to GET and POST data so that you can test it either way.