Reply to Re: PHP file sends headers the moment it's included!

Your name:

Reply:


Posted by Chung Leong on 12/29/05 07:27

comp.lang.php wrote:
> [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!
>
> Thanx
> Phil

What I usually do is to call ob_start() before I include a long list of
files, then call ob_end_clean().

[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

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