正确检查上传文件类型或者get mine type from file
[DllImport(@"urlmon.dll", CharSet = CharSet.Auto)]private extern static System.UInt32 FindMimeFromData(
System.UInt32 pBC,
[MarshalAs(UnmanagedType.LPStr)] System.String pwzUrl,
[MarshalAs(UnmanagedType.LPArray)] byte[] pBuffer,
System.UInt32 cbSize,
[MarshalAs(UnmanagedType.LPStr)] System.String pwzMimeProposed,
System.UInt32 dwMimeFlags,
out System.UInt32 ppwzMimeOut,
System.UInt32 dwReserverd
);
详细请看:
http://www.cnblogs.com/jackliu185/archive/2009/07/17/1525695.html --------------------编程问答-------------------- UP!
补充:.NET技术 , C#