The debug + trace mode allows you to view the TP error information during the development process and help developers debug better. However, enabling the debug mode is not easy to set in the configuration file. After checking the information, find an effective method.
First, you have deployed the thinkphp project directory.
Note that the debugging mode is enabled in the entry file, and the index is in the entry file. write the Code define ('app _ debug', true) in PHP. First, delete the runtime directory and run it again. You will find ~ The runtime. php file is missing, indicating that your debugging mode is successfully enabled.
This ~ Runtime. php file deletion. This file will be cached after compilation, so during the debugging mode, we do not have to worry about other errors caused by caching.
The trace page is also a way for our developers to get error information, so we need to enable the trace page. In thinkphp3.0, the trace page is not enabled by default, you need to manually add
'Show _ page_trace '=> true, // display page trace information
To check whether the trace information is enabled, as long as the index side in indexaction. Class. php
Add $ this-> display ();
Then run it again. If you see the following interface, it indicates your debugging mode, trace, and enable
Original article: http://www.cnblogs.com/summerzi/category/594881.html