|
Posted by Angelos on 05/14/05 12:53
>> Hello again... I was wondering is there any way to check or output in the
>> errors string which file or where in my code the headers have been sent ?
>
> This is the error message I get with PHP 4.1.2 when such error happens:
>
> Warning: Cannot add header information - headers already sent by (output
> started at /mnt/webs/Pruebas/www/borrame.php:7) in
> /mnt/webs/Pruebas/www/borrame.php on line 9
>
> Have you disabled error reporting? Try this:
>
> error_reporting(E_ALL);
I have enabled the error reporting. And I also have
error_reporting = E_ALL
which should report my errors as you say above. Although it doesn't work for
some reason.
The only error that I get is the one that I wrote in my function:
function redirect($url)
{
if(!headers_sent())
{
header('Location: http://'.$_SERVER['HTTP_HOST'] .
dirname($_SERVER['PHP_SELF']) . '/' . $url);
}
else
{
die('Could not redirect; Headers already sent.');
}
}
Navigation:
[Reply to this message]
|