RE: [PHP] 2 successive commands in one shell_exec?

From: Date: Tue, 21 Oct 2008 02:26:34 +0000
Subject: RE: [PHP] 2 successive commands in one shell_exec?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282169@lists.php.net to get a copy of this message
hello... why can't you simply specify the dir/cmd when you run the exec function ie foo = exec("var\cmd.sh") or use the backtick approach instead of the exec/shell_exec cmd... make sure you have given the cmd "x" privs... and that your process you're running the php app has the privs to run the cmd... -----Original Message----- From: Govinda [mailto:govinda@blisscode.com] Sent: Monday, October 20, 2008 7:17 PM To: PHP-General List Subject: [PHP] 2 successive commands in one shell_exec? How do we use string shell_exec ( string $cmd ) to hit another cgi script from within a PHP page? I mean I need to do that, and so with my very newbie level of understanding I think I need to have that shell_exec essentially do 2 things at once: -goto the right dir, and then -fire the script in that dir. like these 2 successive commands in terminal: cd $MyPath ./MyOtherCGI.cgi It seems initially clear at lease how to do either one of those terminal commands from within shell_exec, but not *both*. How do I get both commands in there? Sorry if my Q is too green -Govinda -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#282169) next »