查找:
header( "Content-Disposition: attachment; filename=\"{$attach['attach_file']}\"" );修改成:
//header( "Content-Disposition: attachment; filename=\"{$attach['attach_file']}\"" );
// Fix IE attachment name bug
// Modified by Skylook -- begin
// If it is IE browser
if( (strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 8.0")) || (strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 7.0")) || (strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 6.0")) )
{
header( "Content-Disposition: attachment; filename=\"" . rawurlencode($attach['attach_file']) . "\"" );
}
else
{
header( "Content-Disposition: attachment; filename=\"{$attach['attach_file']}\"" );
}
// Modified by Skylook -- end保存即可。
PS:
1、此方法可判断浏览器类型,对于 IE 和 FF 等浏览器均适用;
2、此方法参考:
http://www.ipbchina....96%b9%e6%b3%95/

说明


转载到专栏








