|
Posted by Glenn on 04/07/07 21:37
On Sun, 08 Apr 2007 00:27:30 +0300, Rami Elomaa
<rami.elomaa@gmail.com> wrote:
>Toby A Inkster kirjoitti:
>> usenet wrote:
>>> den5385@gmail.com wrote:
>>>
>>>> <?php
>>>> echo "bbb";
>>>> include("common/funcs.php");
>>>> echo "a";
>>>> ?>
>>>>
>>>> Everying print or echo statement after the include gets ignored. Why
>>>> would this be?
>>> Something in the included file is probably causing processing to terminate. Try
>>> checking your error log for clues.
>>
>> That's the most likely explanation. Another possible explanation, though
>> less likely, is that funcs.php turns on output buffering.
>>
>
>Close, but no cigar. The included file might turn on output buffering,
>but if nothing catches the buffer and cleans it, then everything is
>output normally when the program exits.
>
><?php
>echo "bbb";
>include("common/funcs.php");
>echo "a";
>ob_end_clean(); // the original script doesn't have this
>?>
>
>Of course there is register_shutdown_function(), so yeah, it's
>_possible_ to get the ob_end_clean executed at the end without it being
>in the script, not very likely though. :)
How about just executing a flush() after the last echo to verify?
Navigation:
[Reply to this message]
|