I have a general question to do with application directory structure. I have my application and all the files required on a git repo that is regularly updated (PHP files, CSS, JS etc). And I have an uploads folder where users' uploaded avatars and files get stored.
Is it convention to separate these two parts of the app for example?:
public_html
/app
/uploads
or should the directory structure look more like this?:
public_html
/index.php
/css
/js
/uploads
When I merge changes from github I don't want any of my users' files to be affected.
/uploads to .gitignore?I think both structures are fine -- it's up to you. As long as the uploads are in a seperate folder, you can exclude that from versioning and you should be fine. Your .htaccess can be in the versioning system as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With