Hi people
I need to invoke a php script via the php.exe engine like so:
c:\php\php.exe c:\myfile.php
I would like to be able to send parameters to the myfile.php script.
Can anyone show me the correct syntax to doing this?
regards
how to pass parameters to a PHP file invoked via the shell
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
There are several avenues for getting input via the command line. Many choose to use argv and argc.
http://php.net/reserved.variables#reser ... les.server
http://php.net/reserved.variables#reser ... les.server