PDA

View Full Version : File Structure


Tstright
01-16-2006, 02:32 PM
How should your file structure be setup?

All files in one directory?
Should the images and the html files be seperate?
Have the html and related images in one folder?(one folder for each web page)

I want to start off right and not get into a big mess...

gmcrone
01-16-2006, 02:42 PM
It really depends on how big your site is going to be.

With few pages you can have all your htm files in the root directory and just have a subdirectory for images.

On a larger site it is better to have each section in a different subdirectory with only your index page in the root directory.

Mike....

Tstright
01-16-2006, 03:33 PM
On a larger site it is better to have each section in a different subdirectory with only your index page in the root directory.

Mike....
This is what I was thinking, It's just a site for the apprenticeship school that I teach at, but we are thinking of adding more in later for instructors...

Thanks

davidj
01-16-2006, 03:45 PM
IMO if i was developing a site for a college and there was different departments and micro sites then i would use seperate dir's

if its a small to medium site of say upto 40 - 50 pages then i would be happy to stick them in the root. Its upto you and the way you work really

always have your images in a seperate dir no matter what size the site is

Creative Insanity
01-16-2006, 06:29 PM
I like structure and tidiness myself. No matter if the site is 1 page or 100 pages I always use a set structure, which is;

/index.php
/images/*.png
/images/template_images/*.png
/inc/*.php
/admin/index.php
/admin/inc/*.php

and so on.
But at all times there is on the index in my root www folder.

davidj
01-17-2006, 02:57 PM
But at all times there is on the index in my root www folder.

i drop index's into other sub directories just so the directory isnt viewed

domedia
01-17-2006, 03:10 PM
But at all times there is on the index in my root www folder. i drop index's into other sub directories just so the directory isnt viewed
Should be easier just setting the server to disallow directory browsing, no?

davidj
01-17-2006, 03:24 PM
we develop apps on a development machine

these are developed for banks which could be used internaly or as an ebanking system

depending on who,what,why and how,
normaly we are not permited to have any access to their system. We ftp our root and all its contents then the banks IT guys find a home for it. I just stick an index file in each dir at the end of development just to keep it all tidy

we are currently building a system for a police force where we have to burn the site to DVD with an install shield and send them it as we complete update's

we also use htaccess

Creative Insanity
01-17-2006, 08:17 PM
I do the same with my dirs dj.. there is a redirect to the front index file.