TeddyKiller Posted August 18, 2010 Share Posted August 18, 2010 My directory is full of clutter, and sometimes its hard to find what I need. My first question is: Does splitting things apart into separate directories where its more easier to read.. and find make performance better than cluttering it all together, or is it just personal preference? My directory layout is as follows - Public_HTML > - assets - cgi-bin - ima - include - js - languages - modules - profile - styles - template Assets and JS, both have JavaScript files in only. Modules have folders inside, of the modules on the site. eg: Admin Panel, Friends, User Messages etc which inside them folders would have necessary information and php files needed. Template, is basically.. junk. It's not needed at all. Profile, is again.. junk, because all profile related code, would go into the modules folder. Styles is CSS. I'm not sure how you'd lay it out.. but I would go something like.. - Public_HTML > - assets - css - cgi-bin - images - includes - modules Styles becomes css, JS goes into assets. "profile" ends up in modules, and so does languages... My second question is: Is there any advice you can give with laying out a site directory, also.. how would you lay out what I have gotten so far, using the directories mentioned at the top. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/211102-site-directory-layout-help/ Share on other sites More sharing options...
Philip Posted August 18, 2010 Share Posted August 18, 2010 I typically consider css, images (used in site design), js all assets. -assets ---css ---images ---js Quote Link to comment https://forums.phpfreaks.com/topic/211102-site-directory-layout-help/#findComment-1100927 Share on other sites More sharing options...
TeddyKiller Posted August 18, 2010 Author Share Posted August 18, 2010 I typically consider css, images (used in site design), js all assets. -assets ---css ---images ---js Yeah.. that does make sense. Which means my directory would have 4 directories with sub-directories inside them. Looks rather tidy. By doing what KingPhilip stated, it ends up being.. - public_html > - assets > - css > // CSS Files - images > // Site Images - js > // JS Files - cgi-bin > // CGI Dump - includes > // Config file, and necessary other includes - modules > // All site modules * Page names * Anyone else got any suggestions, opinions, advice etc? Quote Link to comment https://forums.phpfreaks.com/topic/211102-site-directory-layout-help/#findComment-1100931 Share on other sites More sharing options...
TOA Posted August 27, 2010 Share Posted August 27, 2010 Anyone else got any suggestions, opinions, advice etc? I do it the same way. Not sure about performance..if a system is affected that much by making it check sub-directories, its time to change systems in my opinion (doubt that's your case) so I wouldn't worry about it if I were you. I think its mainly personal preference; to keep everything in order. Quote Link to comment https://forums.phpfreaks.com/topic/211102-site-directory-layout-help/#findComment-1104325 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.