For the project, I am implementing a file upload system. For each user account, I would like the script to create a different subfolder. Let's say their user_id.
Each time a user is added, the system will create a new subfolder for its own downloads. For instance:
Download / - user1 - user2 - user3
By executing mkdir ('Uploads /'.$ user_id, 0777); he will create a new subfolder. Everything is good.
However, my application cannot write to this folder. How do I configure php to directories with the required file permissions? I tried using chmod without success.
source share