On Aug 15, 2012, at 4:42 PM, Andrew Ballard <aball...@gmail.com> wrote:
> On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling <t...@sperling.com> wrote:
>> The php manual ( http://us3.php.net/manual/en/function.session-start.php )
>> 
>> First Note states that session_start() must be called *before* anything sent 
>> to the Browser.
>> 
>> So, to rewrite your code --
>> 
>>     for($i=1; $i < 1000; $i++)
>>       {
>>       if (!defined('SID'))
>>         {
>>         session_start();
>>         echo __LINE__, '::session_start()<br>';
>>         }
>>       }
>> 
>> -- should work better, right?
>> 
>> Cheers,
>> 
>> tedd
> 
> 
> -snip-
> However, due to the nature of your test page you are still
> sending output from the first loop before you call session_start() in
> the second loop.

Duh!

Too many brain surgeons working on this brain!

In the real world neither of us would have made those mistakes.

It is only when we try to make things simple do we over complicate.

Cheers,

tedd

_____________________
t...@sperling.com
http://sperling.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to