After using TP for a project over the past few days, I suddenly found that the session could not be used. the session value set in one controller could not be called in another controller. I don't know where the problem is. I remember that I didn't change anything. I think I should be myself.
After using TP for a project over the past few days, I suddenly found that the session could not be used. the session value set in one controller could not be called in another controller.
I don't know where the problem is. I remember that I didn't modify anything. I thought that my business logic was not written in any place, which affected the session. Finally, I checked it online and someone encountered this problem. The solution was to modify php. INI files can't be left alone. The result is really good. of course, the main method is not very good, and there is a security risk for the server. this is no way.
1. make sure that the php. ini file is in the c:/windows directory.
2. modify session. auto_start = 0 in php. ini to session. auto_start = 1 // Set to enable session automatically.
3. restart the apache server. // you can use the server only after the previous modification. if not, perform step 1.
4. modify session. save_path = "C:/tmp" in php. ini, remove the front edge, modify the save path of the session, and automatically create the tmp folder.