|
Posted by Rami Elomaa on 04/07/07 21:27
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. :)
--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."
[Back to original message]
|