Solution to thinkphp's token verification failure: 1. Turn off debug mode; 2. Open the config.php file and turn off page trace information output by setting "'SHOW_PAGE_TRACE' => false,"; 3. Enable sae engine is enough.
The operating environment of this tutorial: Windows 7 system, ThinkPHP version 5, Dell G3 computer.
What should I do if the token verification of thinkphp fails?
thinkphp WeChat development token verification failed
In the past few days, token verification has always failed when using WeChat
Finally found a solution online!
These days when I use WeChat, I always fail to verify the token.
After many searches, I finally found the problem.
is because page output and debugging mode are turned on when writing code.
The summary is as follows:
Note: Turn off debug mode. Turn off the trace information output on the page and enable the sae engine
Do these three steps and the configuration will be successful without any problems
config.php文件: 'SHOW_PAGE_TRACE' =>false, // 显示页面Trace信息 index.php文件: define('APP_DEBUG', false); define('ENGINE_NAME','sae');
It is recorded here for everyone to avoid such low-level errors.
Recommended learning: "thinkPHP Video Tutorial"
The above is the detailed content of What to do if thinkphp token verification fails. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)
