Reply to Re: no echo after include?

Your name:

Reply:


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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация