Afficher un message
Vieux 13/07/2007, 22h04   #2
Avinesh Bangar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: session_set_save_handler and error handling

"Werner Elflein" <email@wernerelflein.de> wrote in message
news:f78m9f$q72$02$2@news.t-online.com...
> Let open, close, read, write, destroy and gc be PHP functions to save the
> superglobal array $_SESSION in a database.
>
> I would like to use the following code:
>
> [1] session_set_save_handler(open,close,read,write,gc) ;
> [2] session_start();
> [3] if(!isset($_SESSION))
> [4] {
> /* error handling */
> exit;
> }
> /* session okay */
>


Take a look at this:
http://www.zend.com/zend/spotlight/c...e8.php?print=1 It
essentially covers everything you're trying to do.

> But what will happen, if (e.g.) the database is down?


If no database connection is found or established, usually an E_WARNING
warning is presented (unless you have disabled such warnings).

Regards,
Avinesh


  Réponse avec citation
 
Page generated in 0,05110 seconds with 9 queries