note 116017 added to function.session-status
| From: | dingus_76 at hotmail dot com | Date: | Thu, 30 Oct 2014 04:01:47 +0000 |
| Subject: | note 116017 added to function.session-status | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200745@lists.php.net to get a copy of this message | ||
A Basic backport of this to php 5.3 can be done with.
<?php
if (!defined('PHP_SESSION_DISABLED')) {
define('PHP_SESSION_DISABLED', 0);
}
if (!defined('PHP_SESSION_NONE')) {
define('PHP_SESSION_NONE', 1);
}
if (!defined('PHP_SESSION_ACTIVE')) {
define('PHP_SESSION_ACTIVE', 2);
}
if (!function_exists('session_status')) {
function session_status(){
if(!function_exists('session_id')) return PHP_SESSION_DISABLED;
if (session_id() === "") return PHP_SESSION_NONE ;
return PHP_SESSION_ACTIVE;
}
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 122.149.141.252
----
Manual Page -- http://php.net/manual/en/function.session-status.php
Edit -- https://master.php.net/note/edit/116017
Del: integrated -- https://master.php.net/note/delete/116017/integrated
Del: useless -- https://master.php.net/note/delete/116017/useless
Del: bad code -- https://master.php.net/note/delete/116017/bad+code
Del: spam -- https://master.php.net/note/delete/116017/spam
Del: non-english -- https://master.php.net/note/delete/116017/non-english
Del: in docs -- https://master.php.net/note/delete/116017/in+docs
Del: other reasons-- https://master.php.net/note/delete/116017
Reject -- https://master.php.net/note/reject/116017
Search -- https://master.php.net/manage/user-notes.php