note 35794 added to ref.exec

From: Date: Mon, 15 Sep 2003 08:14:26 +0000
Subject: note 35794 added to ref.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-56501@lists.php.net to get a copy of this message
Windows users. This is just a summarisation of other mails in this list but I hope it will save others some time. To run the program: C:\prg Path\program.exe -var1"Hello" -var2"World" You need to do the following: $exe = "start /D \"C:\\prg Path\\" \B program.exe -var1\"Hello\" -var2\"World\""; exec($exe); As you have a space in the path you need to put it between "". Also ypu need to escape the slash in the path (\\). As you see you need to escape the "" for the two variables. Best regards Fredrik ---- Manual Page -- http://www.php.net/manual/en/ref.exec.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35794 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35794&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35794&report=yes

« previous php.notes (#56501) next »