微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php 网页导出word doc文档的简单示例

PHP将网页导出word doc文档感兴趣的小伙伴,下面一起跟随编程之家 jb51.cc的小编两巴掌来看看吧!

/**
 * PHP将网页导出word doc文档
 *
 * @param 
 * @arrange 512-笔记网: www.512Pic.com
 **/
<?PHP 
header(Content-Type:application/msword); 
header(Content-disposition:attachment;filename=doc.doc); //指定文件名称 
header(Pragma:no-cache);
header(Expires:0);
$html = '<table align=center>';
$html .= '<tr bgcolor=#f6f7fa><td><span style=color:#FF0000;><strong>标题</strong></span></td></tr>';
$html .= '<tr><td align=center>内容</td></tr>'; //内容
$html .= '</table>';
echo $html;
?>
/***   来自编程之家 jb51.cc(jb51.cc)   ***/

原文地址:https://www.jb51.cc/php/528174.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐