RE: [PHP] exec/system question..

From: Date: Wed, 21 Jul 2004 20:04:36 +0000
Subject: RE: [PHP] exec/system question..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191396@lists.php.net to get a copy of this message
bruce wrote: > michael... > > something strange is happening/or i'm missing something basic... but > here's the sys response from your suggestion... > > [root@lserver2 test]# php -r 'exec("bash -c 'exec nohup perl > /home/test/college.pl >/dev/null 2>&1 &'");' > [3] 2566 > -bash: ");: command not found Sorry, you've got to either escape the embedded single quotes: php -r 'exec("bash -c '\''exec nohup perl /home/test/college.pl >/dev/null 2>&1 &'\''");' or just use double quotes and escape the embedded double quotes: php -r "exec(\"bash -c 'exec nohup perl /home/test/college.pl >/dev/null 2>&1 &'\");"

« previous php.general (#191396) next »