php中模版生成html的原理
2012-08-31 17:43
260 查看
//打开模版文件 $file=fopen('temp.html','r'); $html_content=fread($file,filesize('temp.html')); //替换模版标签 $php_content=str_replace('{','<?php echo ',$html_content); $php_content=str_replace('}',';?>',$php_content); //新建php模版文件 $php_temp=fopen('temp.php','w'); fwrite($php_temp,$php_content); //赋值 $title='temp'; $content='temp'; include('temp.php');
相关文章推荐
- PHP基础-生成静态html页面原理
- PHP生成HTML前提条件及原理介绍
- 利用PHP生成静态HTML文档的原理
- php生成html静态页面缓存技术原理【附实例】
- PHP生成HTML的技术原理
- PHP生成HTML的技术原理
- 利用PHP模版生成静态的HTML
- 利用PHP生成静态html页面的原理
- 利用PHP生成静态HTML文档的原理
- php生成html原理核心代码
- 利用PHP生成静态HTML文档的原理
- PHP、.NET生成HTML的技术原理分析
- php生成静态html页面缓存技术原理+实例
- PHP批量生成静态HTML的简单原理和方法
- php生成静态html文件原理
- PHP批量生成静态HTML的简单原理和方法
- PHP生成HTML的技术原理
- HTML网页设计之PHP下载生成的excel表格
- 使用PHP生成二维码(PHP QR Code二维码生成类库)http://www.myxzy.com/post-423.html
- ASP+模版技术生成静态HTML网页实例