Today, when I used phpcms V9 to add a new module, I found a strange problem: in the same module operation, sessions between methods (pages) do not work, that is, the $ _ Session array cannot be passed. I thought it was because the server didn't enable the session function. I tried it for various reasons, but I still couldn't. I finally found out why it was the system itself. When I created an operation class, I introduced a system file on the top, for example:
Defined ('in _ phpcms ') or exit ('no permission resources. '); // pc_base: load_app_class ('admin', 'admin', 0);/* $ session_storage = 'session _'. pc_base: load_config ('system', 'session _ store'); pc_base: load_sys_class ($ session_storage); */class index {function _ construct () {.............
Just comment them out.
Phpcms V9 logon uses session, which can be saved in two ways: database storage and file storage. The default mode is database storage. Sometimes the database does not work in this way. You can go to \ caches \ configs \ system. modify the storage method of the sesion in PHP. // configure 'session _ store' => 'mysql' for the session, and change it to // configure 'session _ store' => 'files' for the session ', it cannot be blank. Otherwise, the logon will not be successful.