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)   ***/

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...