Fix thinkphp off debug mode times wrong problem summary, thinkphp times
Case one:
Recently developed a project with thinkphp, the local development test completed upload to the server, the first time to open the normal, and then refresh the page when the "page debugging error, cannot find the page, please retry" error.
I am depressed, obviously local set define (' App_debug ', false) run no problem, how to put on the server on the error?
Baidu,google still did not find the solution, suddenly found that the project App_name/runtime/cache directory and App_name/runtime/logs directory does not have writable permissions, decisive change, F5, ah well, Mom doesn't have to worry about error messages any more!
Case TWO:
Thinkphp a problem similar to the following occurs when the App_debug constant is set to false:
Copy the Code code as follows:
Parse error:syntax error, unexpected t_string in e:\phpnow\htdocs\ojbak\runtime\~app.php on line 1
or directly report "Server error", what should I do?
This has something to do with PHP, to modify the configuration in php.ini.
Copy the Code code as follows:
Short_open_tag = On
Because the build method inside the app.class.php:
When debug mode is turned on, the contents of the relevant file are retrieved and then re-assembled into a file, which is automatically added.
That's the ~app.php file you saw.
However, when you do not turn on debug mode, the relevant files will be loaded every time, this way, your error will be exposed.
Case THREE:
After you set App_debug to False in thinkphp, the data query (select, find, and so on) always displays the first one: But after setting the App_debug to true, it's normal. Why is this? Do you have any solutions?
Normally, App_debug is the debug mode, put to the online environment, as far as possible to set to false:
Find a select query by yourself, and in the case of debug shutdown, debug the SQL generated after the query by writing the file.
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/987890.html www.bkjia.com true http://www.bkjia.com/PHPjc/987890.html techarticle solve thinkphp debug mode times wrong problem summary, thinkphp Times case One: recently developed a project with thinkphp, the local development test completed upload to the server, the first time ...