class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Yes, the files are weird. In fact, the MIME type is returned as \012- application/msword, which is invalid. The error seems to be with the file, as all the MIME detection techniques return the same thing. Maybe MS Publisher saves the files wrongly.
You can add this to your code so that the class accepts this invalid MIME type:
Yes, the files are weird. In fact, the MIME type is returned as \012- application/msword, which is invalid. The error seems to be with the file, as all the MIME detection techniques return the same thing. Maybe MS Publisher saves the files wrongly.
You can add this to your code so that the class accepts this invalid MIME type: