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