Fix thinkphp off debug mode times wrong question summary, thinkphp times _php Tutorial

Source: Internet
Author: User
Tags parse error

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.