Home >PHP Framework >ThinkPHP >How to open session in thinkphp6

How to open session in thinkphp6

藏色散人
藏色散人forward
2020-07-09 15:25:125314browse

The following tutorial column of thinkphp framework will introduce to you how to open a session in thinkphp6. I hope it will be helpful to friends in need!

How to open session in thinkphp6

Open the middleware.php file in the app directory and add in return:

\think\middleware\SessionInit::class

The above is the detailed content of How to open session in thinkphp6. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete