Re: PHP session variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew:

Your points are well taken -- thanks.

However, my only concern is given this:

>      for($i=1; $i < 1000; $i++)
>        {
>        if (!defined('SID'))
>          {
>          echo __LINE__, '::session_start()<br>';
>          session_start();
>          }
>        }

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


_____________________
tedd@xxxxxxxxxxxx
http://sperling.com
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux