php生成word并下载
//后端代码
public function actionDown(){
//需要进行下载的页面
$result = file_get_contents('test.php");
header("Accept-Ranges: bytes");
header("Accept-Length: ".strlen($result));
header('Content-Disposition: attachment; filename=test.doc');
header("Pragma:no-cache");
header("Expires:0");
echo "$result";
}
//前端代码
<table class="" style=