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:
Yasuo Ohgaki 2002-01-10 07:37:38 +00:00
parent f3b110a280
commit bd4f538caf

View file

@ -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.
}
}