Naming conventions to be followed in PHP 1. all website construction www.ucantech.com files are ". class. php "is a suffix and the class file name can only contain letters. It is named by the camper method and the first letter is capitalized, for example, DbMysql. class. php. 2. files other than other class library files such as configuration and functions are generally named ". inc. php "and ". php "is a suffix, and the name of the file name is named with lowercase letters and the naming conventions to be followed in PHP
1. all website construction www.ucantech.com files are ". class. php "is a suffix and the class file name can only contain letters. It is named by the camper method and the first letter is capitalized, for example, DbMysql. class. php.
2. files other than other class library files such as configuration and functions are generally named ". inc. php "and ". php "is a suffix, and the name of the file name is named by lowercase letters and underscores. multiple words are separated by an underscore (_), for example, config. inc. php, common. php and install_function.php.
3. ensure that the file name is the same as the call case, because it is case sensitive on Unix-like systems.
4. the class name and file name are the same (including the same case), and only letters are allowed for the class name. for example, the file name of the UserAction class is UserAction. class. the file name of the php and InfoModel classes is InfoModel. class. php.
5. the controller class is suffixed with Action, such as UserAction and InfoAction. The Model class is suffixed with Model, such as UserModel and InfoModel. other classes are also suffixed with corresponding categories, such as Service and Widget.
6. the method name can only consist of letters, underlines are not allowed, the first letter must be lowercase, and then the first letter of each word must be capitalized, that is, the so-called "camper naming" rule, the more detailed the method, the better. you should be able to clearly describe the functions of this method, such as switchModel and findPage.
7. attribute naming can only consist of letters, underlines are not allowed, the first letter must be lowercase, and then the first letter of each word must be capitalized, that is, the so-called "hump naming" rule, for example, tablePrefix and tableName. Fblww-1231)