The example of this article describes the solution of the thinkphp3.0 output repeating two times. Share to everyone for your reference. The specific methods are as follows:
The main entry files are as follows:
Copy Code code as follows:
<?php
Define (' App_name ', ' Admin ');//define project name
Define (' App_path ', './admin/');//define Project Store path
Define (' Think_path ', './thinkphp/');//define thinkphp core file path
Require Think_path. ' thinkphp.php '//import Core file
App::run ();
?>
Use the above code composition entry file, but the input result is repeated two times.
It turns out that because thinkphp3.0 's entry file is simpler, by default, only one line of code needs to be added to App::run (), and this line of code commented out or removed is normal.
Copy Code code as follows:
<?php
Define (' App_name ', ' Admin ');//define project name
Define (' App_path ', './admin/');//define Project Store path
Define (' Think_path ', './thinkphp/');//define thinkphp core file path
Require Think_path. ' thinkphp.php '//import Core file
App::run ();
?>
I hope this article will help you with the PHP program design based on thinkphp framework.