NotionCommotion Posted September 9, 2016 Share Posted September 9, 2016 I for no particular reason typically use: - myApplicationName - application/ - classes/ - components/ (from my start with Joomla, and I have a controller, model, view directory in each, however, I am thinking of moving away from) - includes/ - lib/ - js/ - css/ - images/ - etc/ - html/ - index.php - lib/ (a symbolic link to ./application/lib - logs/ - vendor/ - composer.json (and lock, etc) - config.ini - httpd.conf, private.conf, etc if I include with my Apache setup. - readme I've seen others that say: - myApplicationName - src/ - classes/ - includes/ - public/ - index.php - logs/ - vendor/ - composer.json (and lock, etc) - config.ini Is there anything like a recommended file structure? Quote Link to comment https://forums.phpfreaks.com/topic/302126-recommended-file-structure-for-php-project/ Share on other sites More sharing options...
requinix Posted September 10, 2016 Share Posted September 10, 2016 Some people like "src" because that's traditional for compiled languages. It doesn't make as much sense for PHP, and particularly not when it's the only directory at that level. Otherwise you've got the gist of it: public/html should be the web-accessible assets and a PHP script or two, then most everything else lives outside there. Separate classes/includes/lib/logs is good. Quote Link to comment https://forums.phpfreaks.com/topic/302126-recommended-file-structure-for-php-project/#findComment-1537268 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.