I am doing a campus project in php regarding musical site and i have to insert ziped files of songs in the database. so, i don't know how to deal with the zip files. Therefore, help me.

9 Years
Discussion Span
Last Post by somedude3488

I am afraid it's not possible to insert zipped files and songs to the database. What is normally done is simply copying them(songs,images,zipfiles) to the server and storing the details of the uploaded file in the database.
You can google for more details on how to do this


You can but its not recommended. Its better to store them on the server.

You can read the file contents into a longblob field in a database. To retrieve it you need to get the contents from the database, then echo it out to the browser with the correct headers.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.