PHP as a Server Side Scripting ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
caseymanus
Forum Commoner
Posts: 34
Joined: Wed Nov 20, 2002 10:32 pm
Contact:

PHP as a Server Side Scripting ?

Post by caseymanus »

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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross-post (I have deleted the additional post).

Mac
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

User avatar
caseymanus
Forum Commoner
Posts: 34
Joined: Wed Nov 20, 2002 10:32 pm
Contact:

Post by caseymanus »

Thanks for the link, and about cross posting, I realized that this was probably a more advanced question than was usual fair in the basic forum, so I wanted to move it to advanced, hence the cross-post. Is there anyway to move a post?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

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
Post Reply