Re: Execute EXE with variables
| From: | Paul M Foster | Date: | Fri, 13 Feb 2009 20:09:43 +0000 |
| Subject: | Re: Execute EXE with variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288231@lists.php.net to get a copy of this message | ||
On Fri, Feb 13, 2009 at 02:30:38PM -0500, Dan Shirah wrote:
> Hello all,
>
> Can someone point me in the right direction?
>
> I'm trying to call an EXE from PHP and pass it two variables.
>
> I looked at the exec() command and I see that this can call the executable,
> but I don't see that it can pass the variables to it.
>
Use the system() command, and enclose both your command and its
parameters in a pair of single quotes, as:
system('mycmd -a alfa -b bravo');
Paul
--
Paul M. Foster