note 13379 modified in function.exec by danbrown
| From: | danbrown@php.net | Date: | Sun, 04 Jan 2009 16:38:51 +0000 |
| Subject: | note 13379 modified in function.exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148823@lists.php.net to get a copy of this message | ||
Remember to use unix exit(0); 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>
--was--
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://php.net/manual/en/function.exec.php