php 输出excel
/*** 下载模板
*/
public function download_template()
{
$file = "template.xls";
//设置excel 头
header("Content-type:application nd.ms-excel");
header('Content-Disposition: attachment; filename="导入模板.xls"');
$content = file_get_contents($file);
echo $content;
exit();
}
页:
[1]