如何在下载之前检查要下载的文件是.zip还是.rar?
有很多未知的文件名没有扩展名,如:
0001; 技术; 0034; 000345; ....
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="file.zip');
header('Content-Disposition: attachment; filename="file.rar');