Re: Weird behavior of exec()
| From: | Shawn McKenzie | Date: | Thu, 15 Jul 2010 21:19:07 +0000 |
| Subject: | Re: Weird behavior of exec() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306931@lists.php.net to get a copy of this message | ||
On 07/15/2010 10:51 AM, Leonardo wrote:
> Hi everybody. I need to use exec() to run a background php script, but
> it's not working properly. Take a look at this sample:
>
> a.php
> <?
>
> echo ' File A (1) ';
>
> exec('php b.php > output.txt &');
>
> echo ' File A (2) ';
>
> ?>
>
> b.php
> <?
>
> echo 'File B';
>
> ?>
>
Try not use the short open tag. Use <?php
--
Thanks!
-Shawn
http://www.spidean.com