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

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -