Reply to Re: Header already sent

Your name:

Reply:


Posted by Rik on 06/22/07 15:58

On Fri, 22 Jun 2007 17:17:28 +0200, charlespb69
<charles.burnell@gmail.com> wrote:

> On Jun 21, 9:35 am, macca <ptmcna...@googlemail.com> wrote:
>> are you trying to send the session_start() function again in your
>> include file?
>
> I am pretty new to php but why couldn't you use output
> buffering........
>
> ob_start(); at the very beginning of the php code, then at the end of
> the php code use ob_end_flush();?
>

You could, and it would work, it's just bad programming. You hide an error
somewhere that shouldn't be there. Normal procedure is to do all actions
needed first, possibly with session-starting & conditional redirects, then
output. Just because something goes in the <head> of an HTML document
doesn't mean you have to include/output that right away.

--
Rik Wasmus

[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

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