且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用php将html转换为word?

更新时间:2023-02-23 11:34:49

只需将以下代码保留在页面顶部即可进行转换:

just keep following code in top of the page need to convert:

<? header("Content-Type: application/vnd.ms-word");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment;filename=Report.doc");
?>