I am working on some code for uploading specific types of files. I currently have successfully accounted for file types including .doc, .gif, .pdf, .tiff, .txt, .xls, and .xlsx. However, I am trying to allow for Microsoft Word 2007; this file extension is: .docx. I cannot seem to figure out the exact code I need, but here's what I have figured out thus far:
The following code (which is within an IF statement, where I'm specifying what types of files I am allowing) will allow .doc & .xls, but NOT .docx & .xlsx:
- ($_FILES["file"]["type"] == "application/msword")
($_FILES["file"]["type"] == "application/vnd.ms-excel")
- ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document")
($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
- ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document")
Thank you!!!!!
-tjstockton