I have a "files" folder in Web, where I am saving all the user's files.
http://localhost/myweb/files/ we can see all the images inside that folder.
So, I have question:
How to grant access to this folder only for authorised users? Thanks!
I have a "files" folder in Web, where I am saving all the user's files.
http://localhost/myweb/files/ we can see all the images inside that folder.
So, I have question:
How to grant access to this folder only for authorised users? Thanks!
The best way to solve this is to store the images outside of the web accessible folder and serve them with php. For downloadable files you can use this function, but to serve images in the browser I believe you would have to change the headers like in this non-yii answer or this yii-related answer.