首页 > 后端开发 > php教程 > PHP生成静态HTML页面简单方法 html代码 html5 教程 html 空格

PHP生成静态HTML页面简单方法 html代码 html5 教程 html 空格

WBOY
发布: 2016-07-29 08:51:17
原创
1270 人浏览过

PHP文件名:dome.php

<code><span><?php </span><span>$string</span> = <span>1</span>;
    ob_start();
    @readfile(<span>"templets/list.html"</span>);
    <span>$text</span> = ob_get_flush();
    <span>$myfile</span> = fopen(<span>"list.html"</span>,<span>"w"</span>);
    <span>$text</span> = str_replace (<span>"{counent}"</span>,<span>$string</span>,<span>$text</span>);
    fwrite(<span>$myfile</span>,<span>$text</span>);
    ob_clean();
<span>?></span></span></code>
登录后复制

模板文件名:templets/list.html

<code><span><span>html</span>></span><span>head</span>><span>meta</span><span>http-equiv</span>=<span>"Content-Type"</span><span>content</span>=<span>"text/html; charset=UTF-8"</span>><span>title</span>>Insert title here<span><span>title</span>></span><span><span>head</span>></span><span>body</span>><span><span>body</span>></span><span>table</span><span>width</span>=<span>"500"</span><span>border</span>=<span>"0"</span><span>cellpadding</span>=<span>"5"</span><span>cellspacing</span>=<span>"1"</span><span>align</span>=<span>"center"</span><span>bgcolor</span>=<span>"#add3ef"</span>><span>tr</span><span>bgcolor</span>=<span>"#eff3ff"</span>><span>td</span>>用户:{counent_user}  标题:{counent_title}  发布时间:{counent_lastdate}<span><span>td</span>></span><span><span>tr</span>></span><span>tr</span><span>bgcolor</span>=<span>"#fff"</span>><span>td</span>>内容:{counent_content}<span><span>td</span>></span><span><span>tr</span>></span><span><span>table</span>></span><span><span>form</span>></span><span><span>html</span>></span></code>
登录后复制

http://blog.csdn.net/leedaning/article/details/48088863

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了PHP生成静态HTML页面简单方法,包括了HTML方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板