debug+trace mode can view TP error information during the development process, which can better help developers debug. However, turning on the debug mode is not simply a matter of setting it in the configuration file. After searching the information, I found an effective method.
First, go to the project directory where you have deployed ThinkPHP
Then pay attention to enable debugging mode in the entry file, write the code define('APP_DEBUG',true) in the entry file index.php; first delete the Runtime directory, and then run it again, you will find that under the runtime directory The ~runtime.php file is gone, which means your debugging mode has been successfully enabled
The reason why this ~runtime.php file is deleted is that this file is a compiled file and will be cached, so during debugging mode we don’t have to worry about other errors caused by caching
The trace page is also a way for our developers to obtain error information, so we need to enable the trace page. In the THinkPHp3.0 version, the trace page is not enabled by default. We need to manually add
‘SHOW_PAGE_TRACE’ =>true, // Display page Trace informationTo see if the trace information is turned on, as long as we go to the index in IndexAction.class.php
Add $this->display();
Then run it again. If you see the following interface, indicate your debugging mode, trace and enable it. >
http://www.bkjia.com/PHPjc/833843.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/833843.html