mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Clarify user session save handlers return values
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67507 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f3b110a280
commit
bd4f538caf
1 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.71 $ -->
|
||||
<!-- $Revision: 1.72 $ -->
|
||||
<reference id="ref.session">
|
||||
<title>Session handling functions</title>
|
||||
<titleabbrev>Sessions</titleabbrev>
|
||||
|
@ -1010,6 +1010,12 @@ $_SESSION["spongebob"] = "He's got square pants.";
|
|||
extended to cover database storage using your favorite PHP
|
||||
supported database engine.
|
||||
</para>
|
||||
<para>
|
||||
Read function must return string value always to make save
|
||||
handler work as expected. Return empty string if there is no data
|
||||
to read. Return values from other handlers are converted to
|
||||
boolean expression. TRUE for success, FALSE for failure.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>
|
||||
|
@ -1038,7 +1044,7 @@ function read ($id) {
|
|||
$sess_data = fread($fp, filesize($sess_file));
|
||||
return($sess_data);
|
||||
} else {
|
||||
return(""); // Must return ("") here.
|
||||
return(""); // Must return "" here.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue