I would like to ask, when the session is stored in the database or redis, does it store the sessionID or the sessionID and the corresponding value?
For example: $_SESSION['name'] = 'myName';
How to save it in the mysql database. What are the fields in the database table.
Also, does redis use string type to store sessions, or does it use list to store them.
小伙看你根骨奇佳,潛力無限,來學PHP伐。
Database fields are generally sessionid and session serialized values, which are the same whether stored in a database or in redis. There is a PHPSESSIONID or JSPSEESSIon in the frontend through cookies. Of course, you can prevent forgery, etc. anyway. If saved, both the value and key must be saved