Webiste folders

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
djand3y93
Posts: 16
Joined: Tue Nov 02, 2010 6:20 pm

Webiste folders

Post by djand3y93 »

Hi,

I have a basic question. What folders are needed for a webiste and how to organize them?
'cuz I see diferent folders like: images, styles, scripts...etc

Thanks.
User avatar
rockinliam
Posts: 466
Joined: Sun Jun 07, 2009 11:26 am

Re: Webiste folders

Post by rockinliam »

Well tbh it depends on the function of the site.
But i normally go for...

images, includes and javascript
Skillset: C/C++, OpenGL, C#, Lua, PHP, MySql, Web Dev etc.
Website: https://liam-griffiths.co.uk/
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Webiste folders

Post by Jackolantern »

It is really up to you. The only one that is actually required is a "root folder", which will be the main folder, likely named after your website or game. Inside of that, you can set it up however you want. For the most part folder structure is all about organization. For small-to-small/medium sized sites, probably the most common way to organize is to have a folder for CSS, one for JS scripts, one for images, and having your HTML/PHP files in the main folder. However, for larger sites, it will usually stay better organized if you have folders inside your root folder for various sections of the site, and then inside each of those have the CSS, JS, images, etc. folders that are just for that section.

Later on if you start to get into PHP frameworks such as CodeIgniter, Zend or CakePHP, they come with a folder structure already set up, and it usually cannot be changed. But until then, it is all up to you and your personal taste in organization.
The indelible lord of tl;dr
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: Webiste folders

Post by Xaleph »

Yeah it depends, i like to organize my folder structure to keep logic, presentation and scripting seperated. This usually means i have a root file,
a resources folder and an application folder. In the resources folder you can put the CSS folder, the JS folder and an Img folder. The application folder can contain all logic and script files.
Post Reply

Return to “Beginner Help and Support”