Page 1 of 1

Storing Files

Posted: Thu Apr 09, 2009 10:14 am
by kinger88
Hi,

Just joined this forum, looks like it will be very helpful!

I'm a student and i have to do a project which i am doing in PHP.

I want to allow users to upload pictures and mp3 files and was just wondering what the best way to store these files is?

My guesses are either store the file directly in a database
Or store the files in a folder and store the location and or filename in the database?

Plus i don't think it's possible in PHP, but someone may have an idea of how to make a simple player for the mp3 files?

Cheers
Steve

Re: Storing Files

Posted: Thu Apr 09, 2009 1:44 pm
by Bruno De Barros
Your guess is correct, you should do it that way :)

No, PHP cannot play MP3 files. PHP is not meant for that sort of thing. Use a Flash MP3 Player or something.

Re: Storing Files

Posted: Fri Apr 10, 2009 8:47 am
by allspiritseve
kinger88 wrote:Or store the files in a folder and store the location and or filename in the database?
This way would be best.

Re: Storing Files

Posted: Mon Apr 13, 2009 7:50 am
by kinger88
Ok thanks for the help 8)

Re: Storing Files

Posted: Fri Apr 17, 2009 2:49 pm
by kaisellgren
Is it possible for any arbitrary guests to upload MP3s? If so, you really need to keep your eyes open for security holes and in fact, you probably should show us your code.