摘要:
文件上传是我们在开发中常用的功能,通常是只验证文件的后缀是否符合要求有,这样就给不良用心的人留下了后门。所以今天给大家附上一个双重验证的例子。#region ------------上传图片---------------- private bool UploadPic(HttpPostedFile file, ref string msg, int seed) { if (file.ContentLength > 0) { string fileName = file.FileName; ... 阅读全文