最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php中文文名下载乱码解决方法
时间:2011-05-09 编辑:简简单单 来源:一聚教程网
解决中文乱码解决方法有很多种,一种是对url编码如urlencode方法,另一种是下面的header头处理方法以binary方法。
php教程
$file_name = urlencode($_REQUEST['filename']);
header("Pragma: public"); header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header('Content-Type: application/vnd.ms-excel; charset=utf-8');
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: attachment; filename='.$file_name);
echo strips教程lashes($_REQUEST['content']);
?>
-
上一个: php 入门教程用户简单登录代码
相关文章
- 解决PHP中文乱码的4项小技巧 12-15
- php中文乱码问题解决方法 07-04
- Python和php之间通信中文乱码解决办法 03-26
- php中文乱码问题总结与解决办法 05-30
- php 中文乱码的解决方法大集 06-23
- php 调用 webservice 中文乱码解决方案 06-21