I wonder if there is a clear method or example of how to assign a directory to each user of my web platform.
I have tried to search and I have seen many examples, but none clear or updated that is functional.
so they can understand me a little better.
I wish:
ttps//mysite/upload_folder/**username_folder**/img.jpg
and NOT a generic route like
ttps://mysite/upload_folder/img.jpg
Thanks in advance.
When a new user is created you could create a directory with the user_id or name. An example would be
mkdir('upload_folder/' . $user_id . '/img');In this directory you can let the user store images using a form with the upload input.