php - upload only txt files -


how check .txt files uploaded server , not other files in php.

you can test filetype:

if ($_files['file']['type'] == 'text/plain') // file txt 

also, can verify mime-type of file using function mime_content_type.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

email - PHP Mail Error "The Page at X Says: E-Mail can not be sent!" -

Optimized Line drawing in QT -