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.
Webiste folders
- rockinliam
- Posts: 466
- Joined: Sun Jun 07, 2009 11:26 am
Re: Webiste folders
Well tbh it depends on the function of the site.
But i normally go for...
images, includes and javascript
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/
Website: https://liam-griffiths.co.uk/
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Webiste folders
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.
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
Re: Webiste folders
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.
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.