Home >Backend Development >PHP Tutorial >The solution to the problem that thinkphp3.0 output is repeated twice, thinkphp3.2_PHP tutorial

The solution to the problem that thinkphp3.0 output is repeated twice, thinkphp3.2_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:11:16900browse

The solution to the problem that thinkphp3.0 output is repeated twice, thinkphp3.2

The example in this article describes the solution to the problem that thinkphp3.0 output is repeated twice. Share it with everyone for your reference. The specific method is as follows:

The main entry file is as follows:

Copy code The code is as follows:
define('APP_NAME','Admin');//Define project name
define('APP_PATH','./Admin/');//Define the project storage path
define('THINK_PATH','./ThinkPHP/');//Define the path where the ThinkPHP core file is located
require THINK_PATH.'ThinkPHP.php';//Import core files
App::run();
?>

Use the above code to compose the entry file, but the input result is repeated twice.

It turns out that the entry file of thinkphp3.0 is more simplified. By default, you only need to add one line of code. Comment out or remove the App::run(); line of code and it will be normal.

Copy code The code is as follows:
define('APP_NAME','Admin');//Define project name
define('APP_PATH','./Admin/');//Define the project storage path
define('THINK_PATH','./ThinkPHP/');//Define the path where the ThinkPHP core file is located
require THINK_PATH.'ThinkPHP.php';//Import core files
//App::run();
?>

I hope this article will be helpful to everyone’s PHP programming based on the ThinkPHP framework.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/930188.htmlTechArticleThe solution to the problem that thinkphp3.0 output is repeated twice, thinkphp3.2 This article describes the example of thinkphp3.0 output repeated twice times solution. Share it with everyone for your reference. The specific method is as follows:...
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