false,"; 3. Enable the sae engine."/> false,"; 3. Enable the sae engine.">
search
HomePHP FrameworkThinkPHPWhat to do if thinkphp token verification fails

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.

What to do if thinkphp token verification fails

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)