首页
IT
登录
6mi
u
盘
搜
搜 索
IT
文件下载
文件下载
xiaoxiao
2021-04-12
34
public function
actionDownloadxls
()
{
$file_path
=
dirname
(
__FILE__
)
.
'/'
.
iconv
(
"utf-8"
,
"gb2312"
,
'模板.xls'
)
;
// 输入文件标签
Header
(
"Content-type: application/octet-stream"
)
;
Header
(
"Accept-Ranges: bytes"
)
;
Header
(
"Accept-Length: "
.
filesize
(
$file_path
))
;
Header
(
"Content-Disposition: attachment; filename=模板.xls"
)
;
readfile
(
$file_path
)
;
}
转载请注明原文地址: https://ju.6miu.com/read-667460.html
技术
最新回复
(
0
)