At this time, the function bool session_set_save_handler (callback open, callback close, callback read, callback write, callback destroy, callback gc) provides us with a solution to this problem.
The six functions used by this function are as follows:
1. bool open() is used to open the session storage mechanism,
2. bool close() closes the session storage operation.
3. mixde read() Use this function when loading session data from storage
4. bool write() writes all data for the given session ID to storage
5. bool destroy() destroys the data associated with the specified session ID
6. bool gc() for Garbage collection of data in the storage system
For an example, see the session_set_save_handler() function in the PHP manual.
If you use a class to process it, use