Home >PHP Framework >ThinkPHP >What should I do if the ThinkPHP verification code keeps getting errors?

What should I do if the ThinkPHP verification code keeps getting errors?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-22 14:13:423257browse

What should I do if the ThinkPHP verification code keeps getting errors?

Solution to the problem that ThinkPHP verification code always fails:

1. Find the server php configuration file php.ini

Create an info.php file in the root directory of the website.

For example: D:\wwwRoot\wp This is the root directory of the website. In this directory, create a new txt document and enter the following code:

What should I do if the ThinkPHP verification code keeps getting errors?

Then save as info.php.

Then access this file in the browser, for example: http://localhost/info.php

Then you can see the location of the php.ini configuration file where the server php actually works , as shown below:

What should I do if the ThinkPHP verification code keeps getting errors?

Related recommendations: "ThinkPHP Tutorial"

2. Open the php.ini file with txt and search for: session.save_path = This field (will appear in 4 or 5 places), find the one with the directory. For example:;session.save_path = "/tmp". Remove the previous ; sign, then set the correct directory (for example: c:temp) and save.

What should I do if the ThinkPHP verification code keeps getting errors?

#3. Configure all users with modification and read-write permissions (0777) for the correct directory c:temp set in the second step.

What should I do if the ThinkPHP verification code keeps getting errors?

#4. Restart IIS and log in to the backend of the website developed by thinkphp. This is very important. If you do not restart, the changes made above will not take effect.

Restart method: Start menu, run, enter iisreset.

What should I do if the ThinkPHP verification code keeps getting errors?

What should I do if the ThinkPHP verification code keeps getting errors?

The above is the detailed content of What should I do if the ThinkPHP verification code keeps getting errors?. 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