NYCPHP Meetup

NYPHP.org

[nycphp-talk] FUNDAMENTALS #1: Site Structure

D C Krook dkrook at hotmail.com
Thu Sep 4 10:46:05 EDT 2003


My vote is for a directory under the web root, since it gives better 
flexibility to deploy code from machine to machine with a minimum of hassle, 
kind of like packaging a Java web application in a nice tidy WAR file that 
doesn't care about an absolutely mapped OS path.

Granted you keep your classes and beans in a protected "/WEB-INF" directory 
under this web root, but your standard includes stay in the publicly 
accessible web root.

I'm also a fan of naming the includes directory "/inc".  That way you have a 
set of directories whose contents are somewhat self evident based on their 
file extensions or calling tag name, e.g., standard.css goes in "/css", 
functions.js goes in "/js", images of all sorts go in "/img".

Another upshot to this naming convention is that you never worry about 
whether you called it "/include" or "/includes" or "/image" or "/images".

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus




More information about the talk mailing list