PHP website development solution (required for new developers)

Source: Internet
Author: User
Tags sql injection prevention

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


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.bkjia.com/action.php? Id = 123 convert to: http://www.bkjia.com/action/id/123 or http://www.bkjia.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.