Because I studied Java before, I feel very uncomfortable using PHP to do projects now, especially the session mechanism of PHP, which feels much behind Java.
1. PHP uses session, which is identified by passing the session id on each page. The default is to pass it through cookies, so the cookie support function must be turned on in the php.ini configuration file.
2. Set session.save_path in the configuration file, which is the path where session temporary files are saved
3. Every time you need to use session in the page, you must first open session.start();
4. The receiving page of the session needs to have header('Content-type: text/html; charset=utf-8'); to pass the session id