$allow_exts = array('jpg', 'jpeg', 'gif', 'png', 'txt');
/if (!in_array($file_ext, $allow_exts)) {
echo '文件类型不符合要求,请上传指定类型的文件';
exit;
}
die;