This article describes how to repeat thinkphp3.0 output twice. the solution is to convert ThinkPHP2.x to 3. x frequently encounters problems. For more information about thinkphp3.0 output, see the example in this article. Share it with you for your reference. The specific method is as follows:
The main portal file is as follows:
The code is as follows:
<? Php
Define ('app _ name', 'admin'); // define the project NAME
Define ('app _ path', './Admin/'); // defines the project storage PATH
Define ('think _ path', './ThinkPHP/'); // defines the PATH of the ThinkPHP core file
Require THINK_PATH. 'thinkphp. php'; // import the core file
App: run ();
?>
Use the preceding code composition entry file, but repeat the input results twice.
It turns out that the thinkphp3.0 Portal file is simpler. by default, you only need to add a line of code to comment out or remove the App: run (); this line of code is normal.
The code is as follows:
<? Php
Define ('app _ name', 'admin'); // define the project NAME
Define ('app _ path', './Admin/'); // defines the project storage PATH
Define ('think _ path', './ThinkPHP/'); // defines the PATH of the ThinkPHP core file
Require THINK_PATH. 'thinkphp. php'; // import the core file
// App: run ();
?>
I hope this article will help you design PHP programs based on the ThinkPHP framework.