Re: Problem with header()
| From: | _lallous | Date: | Wed, 05 Sep 2001 09:27:58 +0000 |
| Subject: | Re: Problem with header() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66013@lists.php.net to get a copy of this message | ||
I'm not sure if this will help but try putting an ob_start() as the first
line, and just flush the output and redirect with Header()
"Alex Shi" <chpshi@netvigator.ca> wrote in message
news:00e801c135bb$2f75a480$0105050a@pony...
> Hi,
>
> Can anyone tell me why header() cannot been used after any network
> operation?
>
> In my script, there are following steps:
>
> 1).a socket is opened for smtp;
> 2).send email;
> 3).closed the socket;
> 4).use header() to redirect to another page.
>
> If no 1), 2) and 3), 4) can be processed without any problem. But if
> socket steps added, system will send warning message: Cannot add
> header information - headers already sent by ( output started at.....)
>
> So, it seems like fsockopen will cause a header to be sent and other
> header cannot been sent after that within same scritp even though
> the socket is closed. Now my question is how can the second header
> been sent?
>
> Alex
>
>