PDA

View Full Version : Best practise question on where to place files?


keano
03-03-2006, 11:44 PM
when creating a site is it best to have separate folders for each area or just have one image folder with all images and have html pages altogether?

desertdirk
03-04-2006, 12:59 AM
Kind of depends on what kind of website it is, how often it is changed, how complex it is and of course personal prefrence. There is no "rule" so you are free to do it as you choose.

If I have a site with lots of images for different areas, or for different "concepts" then I will have a folder of images for each of those. It makes it easier to find a particular image. Most often if the site is not large I will put all my html or php pages in the root of the site. But again for organizational reasons, I might create several folders. For example a real estate client sells homes, land, and commercial properties. I set up a folder for each of those and have the html pages in the folders, and an image folder inside each so I can keep it all straight.

Again much of it is personal prefrence.

DD

dthomsen8
03-05-2006, 12:24 PM
when creating a site is it best to have separate folders for each area or just have one image folder with all images and have html pages altogether?

I have a separate folder for images, and a separate folder for Adobe Acrobat PDF files, but usually I have all the HTML in the root folder, unless there are a large number of them, say more than 20. I put the robots.txt file in the root folder.

Still, it is mostly a matter of personal preference. It is better to decide on the structure before much of the development is done, though. Dreamweaver does make it easy to change, though, by auotomatically changing relative addresses.

Creative Insanity
03-05-2006, 05:40 PM
Keep a good file structure and this will make it easier for future updates and if the site is handed over to someone else to look after. It makes it easier for them to understand the site and how it is structured.
I am not a fan of a web root folder with heaps of php pages in path.
I have in my path one php file and that is index.php and all the support php files are in either an inc or includes directory. All my images are in a image directory and if complex there could be sub folders in the images directory also.
Administration files are all inside an admin directory. So on a typical site from me there would be in root path, index.php, images directory, includes directory and admin directory and maybe a CSS directory.

keano
03-08-2006, 05:07 PM
Thanks!