Abstract: I have been learning to use cakephp for some days! But some basic things cannot be written smoothly! Note the frequent errors during the learning process! I hope you will pay attention to it in the course of learning !... I have been learning to use cakephp for some days! But some basic things cannot be written smoothly! Note the frequent errors during the learning process! I hope you will pay attention to it during your learning process!
1. poor English, wrong words, and case sensitive! It is often difficult to find out, so you need to learn more English and remember more words!
For example, Containable cannot be written as containable (uppercase) or containabel (le-> el );
class AppModel extends Model { var $actsAs = array('Containable');}
2. file names for controllers, models, and views, including uppercase and lowercase letters and singular numbers!
I personally think that in the singular and plural numbers, the names of controllers, data table names, and view folders are all plural; the names of models are singular!
The file name is case-insensitive, but note the underscore! The code is case sensitive!
Controller: File name: received_notes_controller.php
Code:
class ReceivedNotesController extends AppController{ var $name = 'ReceivedNotes';}
Url: http: // 192.168.11.150/cvs06/received_notes (controller name removed from controller)
Model: File name: received_note.php
Code:
class ReceivedNote extends AppModel{ var $name = 'ReceivedNote';}
View: The folder name is in the plural. For example, "users"
Please try cakephp with uppercase and lowercase letters, underscores, and names! Once you are familiar with it, you will be able to learn and develop more smoothly! Good luck!
The above is the content of Cakephp learning note-case-sensitive, single and multiple numbers. For more information, see The PHP Chinese website (www.php1.cn )!