You are here: Re: [PHP] ob_start & session_start « PHP « IT news, forums, messages
Re: [PHP] ob_start & session_start

Posted by Curt Zirzow on 12/08/05 08:55

On Thu, Dec 08, 2005 at 01:23:40AM -0500, Joe Harman wrote:
>
> So, the question is really... in what order is the best way to do
> this... I would think that you always want to start a session first...
> but then again, you guys are the experts... i am sure someone knows a
> reason when you should not do that.

The first thing I would ask is why are you using/need ob_start().

session_start() should be the first thing that happens in most
cases. Since, well, any code that exist is potentially going to
rely on a session state.

If you are trying to use ob_start() to rid of the common error
'headers already sent in some_file.php on line such and such', i
would first consider why that is causing the error and how can you
call session_start() before that happens.

Since '97 i think i've used ob_start twice, in all my php apps, and
that was cause I wanted to filter the output either with tidy or
modify the data in a very obscure way.

Curt.
--
cat .signature: No such file or directory

 

Navigation:

[Reply to this 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

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