Jtech Posted January 9, 2007 Share Posted January 9, 2007 In this code below i have the upload restricted to just allow images/with .gifbut how can i change the code to allow just text like .txt and microsoft text[b]code[/b][code]$HTTP_POST_FILES['upload_file']['type'] != "image/gif" [/code] Link to comment https://forums.phpfreaks.com/topic/33504-upload-restrictions/ Share on other sites More sharing options...
micah1701 Posted January 9, 2007 Share Posted January 9, 2007 just use the same snippet you have but change the ['type'] to "text/html"see http://www.sfsu.edu/training/mimetype.htm for a list of mime types Link to comment https://forums.phpfreaks.com/topic/33504-upload-restrictions/#findComment-156808 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.