用IE下载附件时,附件名出现乱码问题,主要是编码问题导致的,貌似WEB处理时,附件名为UTF8编码,IE下载时,附件名保存时,却时GB2312编码;
解决方法:(/var/www/html/testlink/lib/attachments/attachmentdownload.php)
header("Content-Disposition: attachment; filename=\"{$attachmentInfo['file_name']}\"")
改成:
$filename = urlencode("{$attachmentInfo['file_name']}");
$filename = str_replace("+", "%20", $filename);
if (preg_match("/MSIE/", $_SERVER["HTTP_USER_AGENT"]))
{
header("Content-Disposition: attachment; filename= \"{$filename}\"");
}
else
{
header("Content-Disposition: attachment; filename=\"{$attachmentInfo['file_name']}\"");
}