Home represents the module front desk can be used with the admin Model View Controller referred to as MVC
The model is that the data models are primarily dealing with the database and the view represents the module controller that is displayed
The MVC pattern has to follow the rules rather than the configuration.
thinkphp in the common folder is the TP framework comes with some functions conf folder convertion.php contains TP all configuration try not to modify the Lang language Pack Library storage is the core class files, in which the Think folder The controller.class.php is the parent of all the controllers in the class file containing many
Now I have a MainController.class.php file in the config file of the Conf folder under the Home folder, which has a method of test, and this test wants to show a template, Then I will go to the View folder to build a folder is and Maincontroller is corresponding to this folder should be named Main, (I built a template named Test.html in the main folder, then I call in the MainController.class.php between the time with $this->display ()//$this->show () can be), Similarly, if it is IndexController.class.php, then a folder named index will be built under the View folder.
if I want to access a method under the controller MainController.class.php Tess and this method does not exist, then this situation will occur, so that our use of the framework and version and so will be leaked, this is very unfriendly
At this point we will find a way to hide these, in the MainController.class.php to do a method named _empty
funtion _empty () { echo// can also insert a view here }
If we are accessing a controller that does not exist, we will also disclose our information so that we need to build a controller named Emptycontroller in the folder controller
<? phpnamespace Home/Controller; Use think/Controller; class extends controller{ function// If the customer is accessing an empty controller, then the inside method must also be empty { echo"Sir, this controller does not exist"; }}
thinkphp Frame Empty Controller