Home >Backend Development >PHP Tutorial >session problem
How to encapsulate session and cookies in native PHP? It is too troublesome to write session_start(); for every page.
How to encapsulate session and cookies in native PHP? It is too troublesome to write session_start(); for every page.
Can be found in the unified entry file @session_start();
or modify the php.ini configuration file
(if not, add it), modify it to:
<code>session.auto_start = On # 默认自动开启session</code>
Using single-entry mode, all requests are forwarded through a PHP. All popular frameworks use single-entry mode.