This article to introduce a about thinkphp open debug mode to cancel the build cache, there is a need to know friends can refer to this article.
Recently back to thinkphp found that the old version of the shutdown cache said the common of the two closed cache files are missing. I've been looking for a long time without knowing what's going on.
So go to read the handbook, see Baidu. Later found that you can turn on debug mode to close the cache, and open debug mode for programmers there are many advantages of OH.
In the thinkphp3.0 full development manual inside search debugging two words, you find a lot of tricks back. Here are the steps to turn on the debug feature
Although the compilation cache is very good, but not conducive to debugging and troubleshooting in the development phase, we strongly recommend that thinkphp developers in the development phase always open debugging mode, easy to detect hidden problems and analysis, solve problems. Turning on debug mode is simple, just add a line of constant definition code to the portal file:
The code in my index.php is shared with you:
The code is as follows |
Copy Code |
Require './thinkphp/thinkphp.php '; Define (' App_debug ', 1); ?> |
After the development phase is deployed to the production environment, you only need to remove the debug mode definition code to switch to the deployment mode.
When debug mode is turned on, the system will load the default debug profile and then load the project's debug profile, with the advantage of the debug mode:
² Open Logging, any error messages and debugging information will be detailed records, easy to debug;
² Close Template Cache, template modification can be effective immediately;
² Log SQL logs for easy analysis of SQL;
² Close the field cache and the data table fields are not affected by the cache;
² Check file capitalization (even on Windows platforms) to help you discover Linux deployment issues in advance;
²
Can be easily used in different stages of the development process, including development, testing and demonstration of any need, different application patterns can be configured to separate project configuration files;
For more usage of debug mode, we'll explain it in more detail later.
http://www.bkjia.com/PHPjc/629133.html www.bkjia.com true http://www.bkjia.com/PHPjc/629133.html techarticle This article to introduce a about thinkphp open debug mode to cancel the build cache, there is a need to know friends can refer to this article. Recently returned to thinkphp to discover the previous old version of the shutdown ...