shanejeffery86 Posted August 18, 2008 Share Posted August 18, 2008 Hey there guys. I need to restrict file uploads to the following types: .XLS and .CSV How would I go about doing that? Thanks. Link to comment https://forums.phpfreaks.com/topic/120217-restricting-file-upload-types/ Share on other sites More sharing options...
peasepud Posted August 18, 2008 Share Posted August 18, 2008 First you would need to check the filetype based on its suffix with something like: $suffix = substr($filename, strripos($filename, '.')); then just check that matches the types you want (xls or csv) before carrying out the upload function. Link to comment https://forums.phpfreaks.com/topic/120217-restricting-file-upload-types/#findComment-619307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.