Get in touch with cakephp and learn to use it, and some days too! But even some of the most basic things can not be successfully written out! In this also the learning process often occurred in the wrong place to remember! Hope that everyone in the process of learning, can attract attention!
1. English is not good, the word is wrong, and pay attention to the case! Often not easy to find, so we have to learn more English, more memory words!
For example: Containable can not be written as containable (initial capitalization) and Containabel (Le->el);
Class Appmodel extends Model { var $actsAs = array (' containable ');}
2. About the controller, model and view file naming, case and singular plural and so on!
Personally, in a single complex, the controller, the data table name, the folder name of the view is a complex number, the model is named singular!
The file name is not case-sensitive, but please note the underscore (_) this stuff! The code is case-sensitive!
Controller: File name: received_notes_controller.php
The code is:
Class Receivednotescontroller extends appcontroller{ var $name = ' receivednotes ';}
Url:http://192.168.11.150/cvs06/received_notes (Controller name removed controllers section)
Model: File name: received_note.php
The code is:
Class Receivednote extends appmodel{ var $name = ' Receivednote ';}
View: The folder name is plural. such as: "Users"
Please have a more experience under cakephp in the case, underline, name! Once familiar, will make oneself in the study and development more smoothly! Good luck!
The above is cakephp learning small-case, single-plural content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!