[英]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.