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

Posted by Joe Harman on 12/08/05 08:23

I guess this was just out of general curiousity... If you started
'session_start()' after 'ob_start()' would the sessions work
correctly? k.. maybe I am still confused... lol... I normally do
session_start() before the ob_start()...

----
Zack Said : 'yes, it will display the content in the buffer before
creating the session. If your session uses cookies (this is usually
automatically decided by php) it cannot send out the header after the
buffer.'
----

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.

;o)
Joe




On 12/8/05, Chris Shiflett <shiflett@php.net> wrote:
> Joe Harman wrote:
> > Okay...makes sense after you spelled it out to me.
>
> That didn't make sense to me (and I missed the original reply). Mind
> elaborating? :-)
>
> Chris
>
> --
> Chris Shiflett
> Brain Bulb, The PHP Consultancy
> http://brainbulb.com/
>


--
Joe Harman
---------
* My programs never have bugs, they just develop random features.

 

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

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