I would like some advice/methods you would use for a site where once a user has registered, a folder is created on the server where they can upload and store their documents and pictures securely - ie no one else can access them.
I tried making a folder with php and getting php to generate a htaccess and htpasswd file - but I couldn't seem to get this to work very well.
Unfortunately this particular site is on a shared host so I cannot put the files in a folder outside of the public folder which is a method I had read about.
Any guidance would be appreciated.
User Folder/area - need some guidance plz
Moderator: General Moderators
- greyhoundcode
- Forum Regular
- Posts: 613
- Joined: Mon Feb 11, 2008 4:22 am
Re: User Folder/area - need some guidance plz
How about using .htaccess to stop all public access to a specified folder (forget about .htpasswd). The folder, let's call it protected/, would however still be accessible to your own scripts. So you could then have a gateway script accessfile.php that allows logged in users to get to those protected files.
Alternatively, how about storing the files in a database? (Though there could be some performance issues there)
Alternatively, how about storing the files in a database? (Though there could be some performance issues there)