I want to give my users the freedom to upload all types of files in my online storage site. I only know how to upload image files such as these:
//other code
$_FILES["file"]["type"] == "image/jpeg"
$_FILES["file"]["type"] == "image/jpg"
$_FILES["file"]["type"] == "image/pjpeg"
$_FILES["file"]["type"] == "image/x-png"
$_FILES["file"]["type"] == "image/png"
//other code
using the ebove code I can upload the given extention files to my site. But I want to upload .mp3 .doc .ppt .docx . pptx .sql and many more possible files. To do that, what should I put in the "question mark" below:
$_FILES["file"]["type"] == ? // for mp3
$_FILES["file"]["type"] == ? // for doc/docx
$_FILES["file"]["type"] == ? // for ppt/pptx
$_FILES["file"]["type"] == ? // for sql
$_FILES["file"]["type"] == ? // for zip/tar/rar
please , tell me if there is any list of all extensions of file and what should I write to upload the asked files?
---Thanks.