false,"; 3. Enable the sae engine."/> false,"; 3. Enable the sae engine.">

Home  >  Article  >  PHP Framework  >  What to do if thinkphp token verification fails

What to do if thinkphp token verification fails

藏色散人
藏色散人Original
2022-12-05 10:07:162005browse

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