1.目录与(不是类文件)都是 小写+下划线,并且以小写字母开头;
如:/application/uctenter/controller
1.类名与类文件首字母大写,名字保持一致; 如:/application/uctenter/controller/user.php
class user{ //属性 public username; //驼峰命名首字母小写 //私有属性 private _userage; //驼峰命名首字母小写 //方法 public function getuser(){//驼峰命名首字母小写 } //魔术方法 function __autoload(){//以双下划线“__”打头 } }
1.函数的命名|配置命名|数据表和字段命名,全小写+下划线方式;
如:get_user()|url_route_on|wll_user
常量命名大写字母和下划线,例如: app_debug和 app_mode;
5. css 采用bootstrap 命名规范,自定义样式为: 当前页+位置+功能 [如:index_left_news]
