PHP Manual
session_set_save_handler
Description
bool session_set_save_handler ( callback open, callback close, callback read, callback write, callback destroy, callback gc )session_set_save_handler() sets the user-level session storage functions which are used for storing and retrieving data associated with a session. This is most useful when a storage method other than those supplied by PHP sessions is preferred. i.e. Storing the session data in a local database.
Parameters
openclosereadRead 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.
writeNote: The "write" handler is not executed until after the output stream is closed. Thus, output from debugging statements in the "write" handler will never be seen in the browser. If debugging output is necessary, it is suggested that the debug output be written to a file instead.
destroygc
Examples
Notes
| Warning |
As of PHP 5.0.5 the It is possible to call session_write_close() from the destructor to solve this chicken and egg problem. |
Support PHPRO.ORG
Search
PHPRO.ORG Poll
Warning: Participation in PHPRO.ORG polls may incorrectly lead you to believe your opinions matter.

RSS Feed




