PHP使用TCPDF生成PDF文件时,如果文件名含有中文会被直接过滤掉,解决方法:修改tcpdf.php。
- 找到output函数,注释以下代码(在7560行左右):
if ($dest[0] != 'F') {
$name = preg_replace('/[\s]+/', '_', $name);
$name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name);
}
- 搜索下面这行代码
header('Content-Disposition: attachment; filename="'.basename($name).'"');
- 1
并替换成:
header('Content-Disposition: attachment; filename="'.$name.'"');
- 1





![战神引擎传奇手游【1.76盛战传奇免授权版[摸摸登陆器]】最新整理Win系复古服务端+安卓苹果双端+GM授权物品后台+详细搭建教程](https://cdn.jxasp.com:9143/image/20251106/1B4E8594B3BEB90E8601D63A8A39CB0B.jpg)













