Page 1 of 1

Which method is easier on the server...

Posted: Thu Jun 13, 2002 9:02 pm
by Peter
I'm using PHP to upload to the server through the browser. I have two methods of storing the files:
  1. fread() the file and store the file data in the database.
  2. copy() the file to a directory and then store the path to the file in the db
I'd prefer method #1, but I don't want it to overload the server. Which one is easiest on the server?

Thanks. :)

Posted: Fri Jun 14, 2002 2:12 am
by MattF
It depends how big the files are really, 100mb downloads wouldn't be so good in the database but small images maybe would be.

Posted: Fri Jun 14, 2002 7:43 pm
by Peter
It'll basically be about 300 or so MS Word Documents and a few images.