php轨范

WBOY
Release: 2016-06-13 13:13:41
Original
768 people have browsed it

php规范

-----------------------------(一)PHP命名规范--------------------------------------
1:类名:使用大写字母作为词的分割,其余均小写,名字首字母大写,不要使用下划线
2:类属性:以m为前缀,其余和类名一样
3:方法命名:is,get,set前缀,驼峰命名
4:形式参数:驼峰命名
5:变量名称:全部小写,单词与单词之间使用"_"连接
5-1:函数命名:全部小写,单词与单词之间使用"_"连接
6:引用变量r为前缀,静态变量s为前缀,和类属性一样
7:常量:全部大写,单词和单词之间使用"_"连接
Copy after login

-----------------------------(一)html命名规范--------------------------------------
1:表单元素
    input:统一txt_name
    checkbox:统一chk_name
    radio:统一rdo_name

Copy after login
Copy after login

-----------------------------(一)db命名规范--------------------------------------
1:数据库名:db_数据库名称
2:表名:tb_表名称

Copy after login


-----------------------------(一)html命名规范--------------------------------------
1:表单元素
    input:统一txt_name
    checkbox:统一chk_name
    radio:统一rdo_name

Copy after login
Copy after login

-----------------------------(一)项目规范--------------------------------------
见附件
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template