PHP website development solution example

Source: Internet
Author: User
Tags sql injection prevention
PHP website development solution example

I. Developer

A) project supervisor
B) page artist
C) page development
D) server program development
E) system and data management
F) Test and version control

2. simple website Group development process

PHP Development Website: PHP website development solution

III. development tools and environment

A) server configuration
I. WEB server: FreeBSD6.1 + Apache2.0 + PHP5.0, SVN Version Control Service (test machine only ).
Ii. database server: WIN2003 server + SQL SERVER 2000 + MySQL5.0, CLUSTERED server cluster service, and email server.
Iii. 100 M/M switch
B) development tools
I. front-end: Macromedia flash 8.0, Macromedia Dreamweaver 8.0, Adobe photoshop CS
Ii. Background: Zend Studio 5.2, SQL Server Enterprise Manager, PhpMyAdmin

IV. technical rules

A) browser compatibility policy: Compatible with IE5.0 and later versions, and compatible with FireFOX2.0 and later browsers.
B) search engine optimization: it focuses on baidu, Google, and Yahoo search optimization to create clear and clear website maps.
C) character encoding rules: the first rate of a Chinese website adopts the GB2312 character standard.
D) file and folder naming: Compatible with win32 and unix systems. the first rate is named by lowercase letters.
E) naming rules for public files:
I. default homepage: index.htm?index.html, index. php
Ii. main CSS file: style.css
Iii. main JS file: main. js
Iv. main program configuration file: config. php
F) uniform naming of public file directories
I. image directory:/images or/pic
Ii. CSS style directory:/css
Iii. JS script program directory:/js
Iv. Template File Directory:/tpl
V. class or component directory:/class or/lib
G) page script specification: use JavaScript
H) names of classes, functions, and variables in the code: Use approximate English words, such as DefaultClass or default_class.
I) code annotation rules: all functions or procedures in a program must be annotated with exact annotations.
J) database rules
I. data table and field naming rules: all lowercase letters are named and the naming prefix is classified, such as: User table group, user_passport, user_info, user_service ....
Ii. date field: unix timestamp, char (12)
Iii. primary key name: all tables must have a primary key named by id.
K) template component rules: the compatible version of Smarty is used in a unified manner, and the cache directory is used in a unified manner to facilitate permission control in Unix.
L) database virtual layer: use Adodb or Pdo in a unified manner. SQL statements must be compatible with existing mainstream database rules.
M) development rules of the factory mode: develop or inherit component classes with comm. php as the center, and uniformly control the IO and class instantiation of file calls.
N) object-oriented development rules: all functions must exist in the form of class ---> process.
O) SQL encapsulation rules: all SQL statements and database queries must exist in the process.
P) URL redirection rules: to optimize the search engine, try to use Apache mod_rewrite module to beautify the URL, such as: http://www.yourname.com/action. php? Id = 123 convert to: http://www.yourname.com/action/id/123 or http://www.yourname.com/action/id_123.html

V. website security and maintenance policies

A) server and database security:
I. establish a complete virus defense mechanism, install a firewall, and disable unnecessary ports and services on the server.
Ii. unified management of user permissions, regular tracking of users and system events, and regular viewing of system logs.
B) disaster recovery and backup mechanisms:
I. create a database cluster to synchronize data with at least one server. in case of an accident, the database system can be automatically transferred to a normal server for stable operation.
Ii. regularly back up files and data and save data and files in various ways.
C) program security policy:
I. SQL Injection Prevention: resolutely filter unforeseen illegal characters and strictly test SQL statements for database queries and updates.
Ii. do not use third-party source code with unknown sources, and do not copy the unknown code to the server easily.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.