Page 1 of 1
Uploading Images.. to MySQL or Directory??
Posted: Wed Feb 08, 2006 12:31 pm
by seodevhead
I am writing a script for car reviews that allows people to review the car they purchased and optionally upload a picture of their car. Should I have the uploaded picture go to the MySQL database or should I have it uploaded as a file to a directory? I have heard various opinions on which method is preferred, but still am clueless as to which I should use and why. It would seem easiest to just store it in the MySQL database as it would allow for easier retrieval/storage, but I really don't know so I thought I would ask you guys. Thanks!
Posted: Wed Feb 08, 2006 12:39 pm
by feyd
Posted: Wed Feb 08, 2006 12:59 pm
by seodevhead
You da man!
Posted: Wed Feb 08, 2006 1:06 pm
by seodevhead
Regarding what you said in the linked post about placing the uploaded files in a .htaccess password protected directory...
Does the password protected directory have any effects on any of the php work being done? In other words, as far as coding, can I just act as if this particular folder IS NOT password protected? Or do I have to hard-code the user/pass for this directory within the php? Thanks!
Posted: Wed Feb 08, 2006 1:11 pm
by feyd
the htaccess file is only used when Apache receives an incoming request for it. PHP will not need or care about it, as it resides on the server making a local (filesystem) request.