public function down_template()
{
$file = PUBLIC_DIR.'/门店导入模板.xls';
header('Content-Disposition: attachment; filename=门店导入模板.xls');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Length: '.filesize($file));
header('Content-Transfer-Encoding: binary');
header('Cache-Control: must-revalidate');
header('Pragma: public');
readfile($file);
exit;
}
PHP readfile实现文件下载
猜你喜欢
转载自blog.csdn.net/m0_37826705/article/details/100010317
今日推荐
周排行