首页 > Web开发 > 详细

如何将PHP网页导出为Word文件

时间:2018-02-09 18:35:41      阅读:253      评论:0      收藏:0      [点我收藏+]
                #将本地临时文件渲染数据
                $file = $protocol_info[‘src‘] . ‘/‘ . ‘baiqishi‘;
                $content = $this->fetch($file . ‘.html‘);//替换成模板渲染
                $wordFile = $protocol_info[‘src‘] . ‘/files/‘ . $run_id . ‘.html‘;
                $fh = fopen($wordFile, "w+");
                fwrite($fh, $content);
                ob_clean();
                fclose($fh);//关闭句柄很重要

 

 

如何将PHP网页导出为Word文件

原文:https://www.cnblogs.com/wangfenphph2/p/8436123.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!