note 116017 deleted from function.session-status by salathe
| From: | salathe@php.net | Date: | Fri, 07 Nov 2014 11:00:33 +0000 |
| Subject: | note 116017 deleted from function.session-status by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200811@lists.php.net to get a copy of this message | ||
Note Submitter: dingus_76 at hotmail dot com
----
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;
}
}
?>