Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is my setup. It's worked great for me for small - very large projects (including a social network).<br> These folders would all live within my main application folder: </p> <ul> <li> config - contains custom PHP config files </li> <li> css - contains the project's CSS files </li> <li> helpers - contains 'helper' files (each file is a collection of functions) </li> <li> images - contains the project's images </li> <li> js - contains the project's Javascript files </li> <li> lib - contains PHP classes specific to the project </li> <li> modules - My MVC framework allows packaging site sections as modules <ul> <li> blog - An example module <ul> <li>controllers - contains the controllers for the module</li> <li>models - contains the models for the module</li> <li>views - contains the views for the module</li> </ul> </li> </ul> </li> <li> views - contains views that should be globally accessible (page header, footer, etc) </li> </ul> <p>All the directories could obviously contain sub-folders that would further organize your files. For example, the 'css' folder could have sub-folders named 'web' and 'mobile'. The 'images' folder could contain a 'user_uploaded' folder which could then contain`'profile'. And of course you can add folders as you see fit, in one project I have a folder called 'uploaders' which just contains stand-alone upload scripts. </p> <p>I also use convenience methods which help construct the filenames of what I want to load. For example, my loadView() will look for the view file in the current module directory, or if you pass an optional $module argument, it will look specifically within that module's folder.</p> <p>I hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload