just a question about directory structure
Moderator: General Moderators
just a question about directory structure
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.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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:
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.