+
95
-

php如何echo下载文本文件?

php
php如何echo下载文本文件?

网友回复

+
15
-
<?php
$ua = $_SERVER["HTTP_USER_AGENT"];
$filename = "中文文件名.txt";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_filename);
header("Content-Type: application/octet-stream");
if (preg_match("/MSIE/",...

点击查看剩余70%

我知道答案,我要回答