1.800.835.1228
Putting the Web to Work
HomeServicesClientsNewsAbout Us

PHP Development Guide

Database Connection

Database connection info should be defined in a single file. A typical place, also the Dreamweaver default, is:

/Connections/conn.php

Functions and Modules

To make the site easy to maintain, we use functions to generate page headers and page footers. Only leave out the content part to each individual page.

For a typical New Circle developed website, all major functions are stored in /php-functions.php.

Global Variables and Constants

Global variables and constants are usually stored in /php-constants.php.

Coding and Naming Standards

Variable Name

Coding

Typical folder/file structure

/admin All site admin pages should be under this directory
/Connections for DB connection info
/images images
/inc for all stylesheets and javascripts
/lib If you choose to use PHP object, define the file with object name, cap the first letter, and put in this directory. See "Cart.php" for example
/samples There is a "samples" folder in the downloadable .zip file, mainly for training purpose.
  • Sample of image upload
  • Sample of using Img2thumb.php to resize images
  • Sample use of "Cart.php"

Site Launch Notes

About NewCircle Consulting, Chicago-based web design and marketing support company, Chinese Translation, localization services
New Circle Blog

For current web technology discussion, reviews and ideas, please check out New Circle Blog.

Chicago Area Office: 4 E. Ogden Ave. #108, Westmont, Illinois 60559 :: 1.630.854.8867 :: info@newcircleconsulting.com
Home | Services | Clients | News | About Us | Contact Us