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