Hi ALL
I have the following file types to upload via a PHP script:
mp3, wav, wmv, wma, aif, ram, rm, asf, asx
Part of my code looks like:
$ValidTypes = array("application/x-gzip-compressed",
"application/x-zip-compressed",
"application/x-tar",
"text/plain",
"image/bmp",
"image/gif",
"image/pjpeg",
"image/jpeg",
"application/msword",
"application/vnd.ms-excel",
"application/mp3",
"application/wav",
"application/wmv",
"application/wma",
"application/aif",
"application/aiff",
"application/ram",
"application/rm",
"application/asf",
"application/asx");
if (in_array($uploadfilename_type, $ValidTypes)) {
$FileTypeOK = true;
} else {
$FileTypeOK = false;
$WarningMessage = "The upload failed because the file type of the uploaded file is unknown";
}
The upload routine works with the types upto the excel file type but not the audio related types. I am not sure what the correct syntax should be, i.e. "application/????" when using audio related files.
Can anyone help me please?
Fanks