Hi Philip,
I think the idea is that you do this:
if (headers_sent($file, $line)) {
echo "headers were sent by $file:$line";
}
Both $file and $line are optional.
--Wez.
On 06/11/02, "Philip Olson" <[EMAIL PROTECTED]> wrote:
> Hello-
>
> headers_sent() has two new parameters as of PHP
> 4.3.0, these are passed in by reference. I see
> no need to have to do:
>
> $file = 'file.php';
> $line = 4;
>
> headers_sent($file, $line);
>
> When one could simply do this:
>
> headers_sent('file.php', 4);
>
> But we can't, we get this error:
>
> Fatal error: Only variables can be passed by reference
>
> This doesn't seem important, forcing one to use
> variables here seems odd, why? Yes & is in the
> proto but afaict it shouldn't be.
>
> On a related note, I tried and failed to return
> anything other then 1 while using these optional
> parameters. I can't even tell if it's reading
> the file. If someone could explain a little more
> that would be very cool.
>
> Regards,
> Philip
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php