Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/211102-site-directory-layout-help/
Share on other sites

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?

  • 2 weeks later...

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.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.