Jump to content

How to organize website files?


krow

Recommended Posts

I've been reading different articles about the way to organize files and folders for websites. Unfortunately I don't seem to fully understand if there's something like the correct or the standard way to do it? All opinions are pretty much in the same path but I've seen they really depend on the complexity of the website, i.e. how large the contents are. Based on what I've read here's how I'm organizing my files

root   img   js   articles		topic1			 article1				   img								   index.html				   ...				   ...			 article2			 article3			 ...			 ...		topic2		topic3		...		...   img   resources	  classes	  libraries	  templates	  ...index.phpcontactus.phperror1.phperror2.php......

I'd like to know if I'm in the right direction?

Link to comment
Share on other sites

I think this does not matter at all,you can put all the files in root without any dirs-if you can remember all the names of files. It's all up to you. I like to keep it like:

Root  images      backgrounds      icons      smileys      etc..  source      scripts      css      plugins      etc..   content      pages      etc..index.phpfavicon.icoerror.phpetc..   

Link to comment
Share on other sites

There's no correct way to do it, but I do find you've misunderstood something. When you see a URL like this: http://example.com/articles/article-titlewhat's actually going on is that a PHP script is reading the URL and extracting data from it to get information from the database. There is not one file for each article.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...