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
Storing Files
Moderator: General Moderators
-
Bruno De Barros
- Forum Commoner
- Posts: 82
- Joined: Mon May 12, 2008 8:41 am
- Location: Ireland
Re: Storing Files
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.
No, PHP cannot play MP3 files. PHP is not meant for that sort of thing. Use a Flash MP3 Player or something.
- allspiritseve
- DevNet Resident
- Posts: 1174
- Joined: Thu Mar 06, 2008 8:23 am
- Location: Ann Arbor, MI (USA)
Re: Storing Files
This way would be best.kinger88 wrote:Or store the files in a folder and store the location and or filename in the database?
Re: Storing Files
Ok thanks for the help 
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Storing Files
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.