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
1. ClassThe class name is capitalized in the first letter of each word, such as the class name Studentcourse.2. ConstantsThe constant name is all uppercase letters, the words are separated by underscores, and the usual names are null, TRUE, FALSE,
Specification | Development Guide
Fleaphp's naming rules and directory structure look more complicated at first, but after you get used to it, you'll see a lot of benefits from this naming convention. The same approach is therefore used in the Zend
A framework written using PHP must have its own specifications, thinkphp and vice versa. Here are The naming conventions that should be followed as much as possible using thinkphp: class 2 files are suffixed with . class.php (This is the thinkphp
From C + + to PHP has been a long time, has been a bit of code cleanliness, for the file name, interface name, class name, method name, etc. use strict hump naming method,But sometimes you hesitate to use the initial capitalization to differentiate
A framework written using PHP must have its own specifications, thinkphp and vice versa. Here are The naming conventions that should be followed as much as possible using thinkphp:
2 .class.php thinkphp internal use of the class library
File naming rules(1) All characters are legal except/(2) Special characters such as @, #, ¥, &, () 、-、 spaces, etc. best not to use, when the use of space as a file name, the execution of the command error;(3) Avoid using "." As the first character
Directory structure:Naming rules:The following naming conventions should be followed as far as possible during development with thinkphp:
Class files are suffixed with. class.php (this refers to the class library file used internally by thinkphp,
ServiceSiteModel.class.php This model controls the database is the Service_site table;1PHP2 namespace Admin\model;3 UseThink\model;4 classServicesitemodelextendsModel {5 6 Private $page= "";7 8 Private $countNum= "";9 Ten Public
The specification of names of PHP files, classes and methods, and the naming of variables is especially important when naming.
1. File naming
The name of the class file must begin with an uppercase letter, and the names of other files (profiles,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.