note 13379 added to function.exec.php

From: Date: Wed, 13 Jun 2001 20:10:06 +0000
Subject: note 13379 added to function.exec.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14424@lists.php.net to get a copy of this message
Remember to use unix exit(o); on unix calls that use Unix redirection operator ">" . This was a real problem for me, I was not getting a response back in the following code until I added exit(0); <?PHP function myspawn() { $command="/usr/local/bin/mybinary infile.txt > outfile.tx2"; exec($command); ## nothing worked for me until I added this next line. exec("exit(0)"); } ?> <html> <head> <title>New Page 1</title> </head> <body> Creating output file now <? myspawn();?> </body> </html> http://www.php.net/manual/en/function.exec.php

« previous php.notes (#14424) next »