note 112513 added to function.session-status
| From: | adrian | Date: | Tue, 25 Jun 2013 07:33:39 +0000 |
| Subject: | note 112513 added to function.session-status | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195344@lists.php.net to get a copy of this message | ||
>The use of this function is lies more towards status management: change the behavior of a script
>when sessions are disabled altogether, for example.
On that note:
<?php
if( session_status() === PHP_SESSION_NONE ){ session_start(); }
?>
This way, you won't try to start a session if a) a session already exists, or b) sessions are
disabled.
----
Server IP: 69.147.83.199
Probable Submitter: 66.215.156.37
----
Manual Page -- http://php.net/manual/en/function.session-status.php
Edit -- https://master.php.net/note/edit/112513
Del: integrated -- https://master.php.net/note/delete/112513/integrated
Del: useless -- https://master.php.net/note/delete/112513/useless
Del: bad code -- https://master.php.net/note/delete/112513/bad+code
Del: spam -- https://master.php.net/note/delete/112513/spam
Del: non-english -- https://master.php.net/note/delete/112513/non-english
Del: in docs -- https://master.php.net/note/delete/112513/in+docs
Del: other reasons-- https://master.php.net/note/delete/112513
Reject -- https://master.php.net/note/reject/112513
Search -- https://master.php.net/manage/user-notes.php