Re: how to execute Exe file in system

From: Date: Fri, 17 Feb 2012 12:45:49 +0000
Subject: Re: how to execute Exe file in system
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-316683@lists.php.net to get a copy of this message
On 17 Feb 2012, at 12:42, Negin Nickparsa wrote: > Oops no! it shows this one: > string(100) "'C:/Program\' is not recognized as an internal or external command, > operable program or batch file. " Change the \\ in the commands to just a single \ but leave the space after it. > On Fri, Feb 17, 2012 at 4:10 PM, Negin Nickparsa <nickparsa@gmail.com> wrote: > ok sorry,I tried yours It generates Null. > > > On Fri, Feb 17, 2012 at 4:06 PM, Stuart Dallas <stuart@3ft9.com> wrote: > Please quote the relevant parts of the email you're replying to - your emails have > massively diminished usefulness to the archives. > > On 17 Feb 2012, at 12:21, Negin Nickparsa wrote: > >> It generates NULL > > > My bad, try this… > > $cmd = 'C:/Program\\ Files/GAMS23.7/gams.exe'.' > '.escapeshellarg('C:/Program > Files/GAMS23.7/trnsport_php.gms').' 2>&1'; > > If that still doesn't seem to work, I suggest you try just executing the command without > arguments… > > $cmd = 'C:/Program\\ Files/GAMS23.7/gams.exe 2>&1'; > > Backticks execute a command and return the output: }ô�|åí6ZØæ > Êùóhttp://php.net/language.operators.execution -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

« previous php.general (#316683) next »