krow Posted February 3, 2013 Share Posted February 3, 2013 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 More sharing options...
Morsusy2k Posted February 3, 2013 Share Posted February 3, 2013 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 More sharing options...
Ingolme Posted February 4, 2013 Share Posted February 4, 2013 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. 1 Link to comment Share on other sites More sharing options...
w3schoon Posted February 4, 2013 Share Posted February 4, 2013 If you are PHP developer it is best practice to use PHP framework like cakephp, codeigniter, symphony, zend framework etc. Frameworks will help you a lot not just only organizing your files and folders but also to utilize and secure your codes. Try this: http://www.phpandstuff.com/articles/top-10-reasons-why-you-should-use-a-php-framework Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now