ThinkPHP3.2.3

Source: Internet
Author: User
1 Controller and URL mode 1.1 Create a controller 1.1.1 how the controller is stored

Storage directory:/application/module/controller/(e.g. Application\home\controller)

Storage File Name: Controller name (capital letter) +controller+.class.php1.1.2 controller code creation rules

① setting namespaces

② introduction of TP Controller base class

③ class to create your own controller

④ Create your own method 1.2 debug mode in TP

The debug mode of TP actually controls the TP about configuration information and function's caching function.

If you turn on debug mode, each time you access the project, TP will load the latest configuration and function information. If debug mode is turned off, when the first access TP will save the configuration and function information to a file (common~runtime.php), subsequent accesses will be read directly each time the file is not going to load the latest configuration information.

It is recommended that you turn on debug mode during the project development phase because you can use the latest configuration information after you turn on debug mode, and you can see specific error messages in debug mode when the code is wrong. If the project needs to be online. It is recommended that you turn off debug mode, because turning off debug mode reduces the generation of log files, and when code is wrong, it only prompts for errors and does not prompt for specific error locations.

ThinkPHP3.2.3

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.