Re: Execute EXE with variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux