|
Posted by Jerry Stuckle on 12/29/05 17:40
comp.lang.php wrote:
> I did just that, emptied "classes.inc.php" out to the following:
>
> <?php if (headers_sent()) print_r("headers sent"); ?>
>
> output: headers sent
>
> It generated headers even when the file was a 1-liner without any
> content whatsoever!
>
> Phil
>
> Oli Filth wrote:
>
>>comp.lang.php said the following on 28/12/2005 21:47:
>>
>>>[PHP]
>>><?php if (headers_sent()) print_r('headers sent');
>>>
>>> // do other stuff
>>>?>
>>>[/PHP]
>>>
>>>I have a file, "classes.inc.php", a library of PHP version 4+ classes.
>>>This library file, the moment it is included, causes headers to be
>>>generated into the HTTP headers! I have no explanation as to how it
>>>does that, it just does that! I have tried everything I can think of,
>>>removing extraneous whitespace, using PICO, deleting and recreating the
>>>file in PICO, to no avail. There is no instance of print_r, echo,
>>>sprintf, nothing anywhere in any of the classes in the file.
>>>
>>>I am out of ideas as to what to do at this point! HELP!
>>>
>>
>>Well, short of posting your code here and hoping that someone will trawl
>>through and spot any possible errors, why don't you try selectively
>>commenting out blocks of "classes.inc.php" until the problem goes away.
>>That way you can narrow the problem down.
>>
>>
>>--
>>Oli
>
>
But it DOES have content - it has a blank line! That in itself is
enough to force the headers to be sent.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|