Re: Re: Multiple session_start()s / Is it a problem??

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

 



* Thus wrote elixon:
> I guess that session_id() method will return null if session is not 
> started (not tested) so theoreticaly you can use:
> 
> if (!session_id()) session_start();

This is the best method.  relying that $_SESSION is set could
falsify your reliance that the session has been started. For
example, some code may be trying to clear all session data prior to
this with:

  $_SESSION = array(); 

Even though it is really set it doesn't mean that the session has
truely started.


Curt
-- 
Quoth the Raven, "Nevermore."

-- 
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