laravel HTML输出word

$info = $this->getAttractionsData($request->input('id'));
$view = view('admin.team-trip.createWordDoc')->with(['data'=>$info]);
$html = response($view)->getContent();
header("Content-Type: application/msword");
header("Content-Disposition: attachment; filename=doc.doc"); //指定文件名称
header("Pragma: no-cache");
header("Expires: 0");
echo $html ;
最后修改:2019-08-20 03:25:11
0