【PHP】php html to word
来源:互联网 发布:最好的优化软件 编辑:程序博客网 时间:2024/04/28 18:16
把前端页面html转化成word:
假如生成如下格式:具
代码如下:
<?php header("Content-type: text/html; charset=gb2312"); header('Content-Type:application/doc'); header('Content-Disposition: inline;filename=check.doc'); $current_school="武汉大学";$name="张三";$gender="男";$birthday="1995/9/12";$nation="汉族";$identify="36242419950912";$str_html="<div class=WordSection1 style= layout-grid:15.6pt ><p class=MsoNormal style= text-align:center ><b><spanstyle= font-size:18.0pt;font-family:黑体 >高等学校家庭经济困难学生认定申请表</span></b></p><p class=MsoNormal><div style= 'text-align: center;font-size:14.0pt '><b><span >学校:</span></b><label class= ps_school id= adding_applicant_check_tilte style= font-size:14.0pt >$current_school</label></div></p><div align= center ><table class= poorTable border= 1 cellspacing= 0 cellpadding= 0 > <tbody> <tr> <td rowspan= 4 style= font-weight:bold; >学生本人基本情况</td> <td>姓名</td> <td class= ps_name >$name</td> <td>性别</td> <td class= ps_sex >$gender</td> <td>出生年月</td> <td class= ps_birthday >$birthday</td> <td>民族</td> <td class= ps_nation >$nation</td> </tr> <tr> <td>身份证号码</td> <td class= ps_identify colspan= 2 style= width: 240px; > $identify</td> <td>政治面貌</td> <td class= ps_political ></td> <td >家庭人均年收入</td> <td class= ps_avg_salary colspan= 2 style= width: 240px; ></td> </tr> <tr> <td>学院</td> <td class= ps_college colspan= 2 style= width: 240px; ></td> <td>专业</td> <td class= ps_major ></td> <td>电子邮箱</td> <td class= ps_mail colspan= 2 style= width: 240px; ></td> </tr> <tr> <td>年级</td> <td class= ps_grade ></td> <td>班级</td> <td class= ps_class ></td> <td>在校联系电话</td> <td class= ps_phone colspan= 3 style= width: 360px; ></td> </tr> <tr> <td rowspan= 5 style= font-weight:bold; >学生陈述申请认定理由</td> <td colspan= 8 rowspan= 3 style= height:120px;width: 960px; ></td> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan= 8 style= text-align:right; border-top:0;width: 960px; >学生签字_______年____月 ____日</td> </tr> <tr> <td colspan= 8 style= text-align:left;border-top:0;width: 960px; >注:可另附详细情况说明。</td> </tr> <tr> <td rowspan= 4 style= font-weight:bold; >民主评议</td> <td rowspan= 4 >推荐档次<div id= suggest_rank ><b></b></div></td> <td>A.家庭经济困难 □</td> <td rowspan= 4 >陈述理由</td> <td colspan= 5 rowspan= 3 style= width: 600px; ></td> </tr> <tr> <td>B.家庭经济特别困难 □</td> </tr> <tr> <td>C.家庭经济突发事件特殊困难 □</td> </tr> <tr> <td>D.家庭经济不困难 □</td> <td colspan= 5 style= text-align:right;border-top:0;width: 600px; >评议小组组长签字:______年 ____月 ____日</td> </tr> <tr> <td rowspan= 5 style= font-weight:bold; >认定决定</td> <td rowspan= 5 >院(系)意见</td> <td colspan= 3 style= width: 360px; >经评议小组推荐、本院(系)认真审核后</td> <td rowspan= 5 >学校学生资助管理机构意见</td> <td colspan= 3 style= width: 360px; >经学生所在院(系)提请,本机构认真核实,</td> </tr> <tr> <td colspan= 3 style= border-top:0;width: 360px; >□ 同意评议小组意见。</td> <td colspan= 3 style= border-top:0;width: 360px; >□ 同意工作组和评议小组意见。 </td> </tr> <tr> <td colspan= 3 style= border-top:0;width: 360px; >□ 不同意评议小组意见。调整为___________</td> <td colspan= 3 style= border-top:0;width: 360px; >□ 不同意工作组和评议小组意见。调整为:__________。 </td> </tr> <tr> <td colspan= 3 style= text-align:left;border-top:0;width: 360px; >工作组组长签字:</td> <td colspan= 3 style= text-align:left;border-top:0;width: 360px; >负责人签字:</td> </tr> <tr> <td colspan= 3 style= text-align:right;border-top:0;width: 360px; > ______年 __月 __日</td> <td colspan= 3 style= text-align:right;border-top:0;width: 360px; > ______年 __月 __日(加盖公章)</td> </tr> </tbody></table></div></div>"; header('Content-Length:'.strlen($str_html));echo ($str_html);?>
小弟初来乍到,一点小经验,欢迎各位技术牛人批评与指教。
0 0
- 【PHP】php html to word
- php word 转 html
- php word 转 html
- PHP java word 转 html
- html to php
- php实现把html转word,doc
- php将html保存为word文档
- Portable HTML To PHP Converter 4
- Converting HTML to PHP Basic (reship)
- php:移除Remove Microsoft Word HTML Tag
- php实现word转html文档的例子
- php实现word转html文档卡死的问题
- php移除Remove Microsoft Word HTML Tag
- php实现将上传word文件转为html的方法
- HTML to word
- PHP+HTML
- PHP+HTML
- HTML+PHP
- 64-bit win7系统使用devcon.exe批量删除多余的网络适配器的注意要点
- 浅谈Eclipse调用Tomcat服务的原理
- lua和c/c++互相调用实例分析
- 【Win7下Android native code的编译和调试】
- vs2010ActiveX使用DataGrid
- 【PHP】php html to word
- OpenGL学习三十九:飘动的旗帜
- Null, Empty, Nothing, and vbNullString的区别
- c语言--sizeof详解
- Thrift入门及Java实例演示
- 指定C++中map的比较函数
- 分享下Eclipse CDT代码自动补全的设置
- 【iOS开发】数据存储之coredata、sqlite、fmdb和sqlitepersistentobject
- NSBezierPath 赛贝尔曲线画聊天泡泡