Page 1 of 1

just a question about directory structure

Posted: Wed Dec 03, 2003 5:56 pm
by Castles
Hey everyone, I'm making a site in php and I was wondering what the best way to lay out the site is... should I have a html folder for html bits and an include folder for included scripts.. and a class folder for the classes? Or should I just keep it all flat? mainly, I'm just wondering what everyone else does.

Posted: Thu Dec 04, 2003 2:43 am
by twigletmac
I separate things out so that I know where they should be - images in an images folder, pdfs in a pdf folder, class and function files in their own folder... but it'll depend on what makes sense to you and how big your site is as to how complex a folder structure you want.

Mac

Posted: Mon Dec 08, 2003 4:36 pm
by uberpolak
When I start a new site, I create at least one images folder. If I'll be using multiple kinds of images heavily, I'll create separate image folders based on type (e.g. a graphics folder and a photos folder). The way I approach most sites is I'll have the different layouts in the root directory, and the content in page directories, depending on what kind of content. I also have a directory for style-related files.

For example:

Code: Select all

Root: index.php, printer.php, etc.
Graphics: header.jpg, background.gif, logo.png, etc.
Pages: home.php, services.php, contact.php, etc.
Styles: default.css, printer.css, menudrop.js, etc.