I often use php as a server side scripting language from the command line, the question I have now is how can I pass a parameter via the command line
I tried doing it this way
php.exe myscript.php?input=testxxx
but input is not part of $_REQUEST, like it would be if you called this as part of a webpage. Does anyone have any clue as to how I could pass in
input parameters when executing a script via the command line?
Thanks,
Casey
PHP as a Server Side Scripting ?
Moderator: General Moderators
- caseymanus
- Forum Commoner
- Posts: 34
- Joined: Wed Nov 20, 2002 10:32 pm
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
have a read of http://www.php.net/manual/en/features.commandline.php
- caseymanus
- Forum Commoner
- Posts: 34
- Joined: Wed Nov 20, 2002 10:32 pm
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
If you feel you've posted in the wrong place and would like a thread moved you can either PM me (or another moderator) and ask. If I think a post is not suitable for the current forum I'll move it.
The PHP - Advanced forum however, would not be the place to post this question as the Advanced forum is for Advanced theory and the Normal forum is for 'how to' type questions. This is a 'how to' question. It is always important that, before posting in a forum, you read it's description to be sure it suits the post you are about to make.
Mac
The PHP - Advanced forum however, would not be the place to post this question as the Advanced forum is for Advanced theory and the Normal forum is for 'how to' type questions. This is a 'how to' question. It is always important that, before posting in a forum, you read it's description to be sure it suits the post you are about to make.
Mac