How to save uploaded files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

How to save uploaded files

Post by yacahuma »

I am writing an application that not only generate files but also alllow to upload files.
I usually create a folder outside the webroot and stream the files. BUT, is it the same
if I use a folder web accessible but password protected??

What about security risk between the two choices?

/system/htdocs/mysite/uploads([password protected)
vs
/system/uploads


Thank you
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: How to save uploaded files

Post by panic! »

system/uploads will be inherently more secure.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: How to save uploaded files

Post by yacahuma »

Thank you.

I found this too
"You should not use this password protection facility for anything serious, like guarding your customer's data, credit card information or any other valuable information. It is basically only good for things like keeping out search engine bots and casual visitors. Remember, your data isn't even encrypted in the directory with this method."
Post Reply