34,333
edits
Changes
→Writing PHP Session Data to a File
$session_data = session_encode(); // Get the session data
$filehandle = fopen ('/tmp/sessionphp_session.txt', 'w+'); // open a file write session data
fwrite ($filehandle, $session_data); // write the session data to file
?>
</pre>
<tt>userName|s:5:"JohnW";emailAddress|s:16:"[email protected]";</tt><br>
== Reading a Saved PHP Session ==