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); }
文件下载
最新推荐文章于 2025-07-17 17:37:38 发布