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

How to open session in thinkphp6

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

The following tutorial column ofthinkphp frameworkwill 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
Previous article:How to hide index.php in tp Next article:How to hide index.php in tp