簡體   English   中英

如何使用 PHP 在 Excel 中導出 HTML 頁面

[英]How to Export HTML page in Excel Using PHP

我想將我的網頁導出為 excel 文件。 下面的代碼 -

<?php
$file="My_Excel.xls";
header("Content-type: application/vnd.ms_excel");
header("Content-Disposition: attachment; filename=$file");
?>

不工作請建議。

正確的代碼是 -

<?php
$file="My_Excel.xls";
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file");
?>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM