note 66325 added to function.session-start
| From: | info at methodus dot de | Date: | Fri, 19 May 2006 06:42:53 +0000 |
| Subject: | note 66325 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111646@lists.php.net to get a copy of this message | ||
To avoid the notice commited by PHP since 4.3.3 when you start a session twice use this function:
<?php
function start_session(){
static $started=false;
if(!$started){
session_start();
$started = true;
}
}
?>
This should help you when your error reporting is set to E_ALL
----
Server IP: 212.124.37.9
Probable Submitter: 83.221.93.15
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/note/edit/66325
Del: integrated -- http://master.php.net/note/delete/66325/integrated
Del: useless -- http://master.php.net/note/delete/66325/useless
Del: bad code -- http://master.php.net/note/delete/66325/bad+code
Del: spam -- http://master.php.net/note/delete/66325/spam
Del: non-english -- http://master.php.net/note/delete/66325/non-english
Del: in docs -- http://master.php.net/note/delete/66325/in+docs
Del: other reasons-- http://master.php.net/note/delete/66325
Reject -- http://master.php.net/note/reject/66325
Search -- http://master.php.net/manage/user-notes.php