$filepath ='http://192.168.1.102:8090/'.$res['data']; //下载文件地址
$arr = explode( '/' , $filepath);
$filename= $arr[count($arr)-1]; //设置下载文件名称,注意后缀名
if($filepath){
header("Content-type: text/plain");
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=".$filename);
header("Cache-Control: must-revalidate, post-check=0, pre-check=0" );
header("Pragma: no-cache" );
header("Expires: 0" );
readfile($filepath);
exit(0);
}
php 客户端下载EXCEL
最新推荐文章于 2023-10-19 09:34:55 发布
关键词由CSDN通过智能技术生成