thinkphp3.0输出重复两次的解决方法_php实例
Jun 07, 2016 pm 05:14 PM本文实例讲述了thinkphp3.0输出重复两次的解决方法。分享给大家供大家参考。具体方法如下:
主入口文件如下:
define('APP_PATH','./Admin/');//定义项目存放路径
define('THINK_PATH','./ThinkPHP/');//定义ThinkPHP核心文件所在路径
require THINK_PATH.'ThinkPHP.php';//导入核心文件
App::run();
?>
使用以上代码作文入口文件,但输入结果重复两次.
原来是因为 thinkphp3.0的入口文件更加简化,默认情况下,只需要添加一行代码即可,将App::run();这行代码注释掉或者去掉就正常了.
define('APP_PATH','./Admin/');//定义项目存放路径
define('THINK_PATH','./ThinkPHP/');//定义ThinkPHP核心文件所在路径
require THINK_PATH.'ThinkPHP.php';//导入核心文件
//App::run();
?>
希望本文所述对大家基于ThinkPHP框架的PHP程序设计有所帮助。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics

Printer operation cannot be completed error 0x0000709 Solution

Methods to solve the problem of Chinese garbled characters in PHP Dompdf

What should I do if my Black Shark phone continues to cycle on and off? The solution is revealed!

Linux Oops Revealed: Causes of Errors and Solutions

Deepseek official website entrance access guide Solve the common problems that cannot be logged in

How to solve the problem of Pokemon Crystal, Diamond, Bright Pearl and Duck blocking the road?

Solution to PHP mb_substr function not executing

Solution to the problem of missing lib files in Linux system
