smarty静态实验表明,网络上是错的~呵呵

yipeiwu_com6年前PHP代码库

复制代码 代码如下:
<? 
 require_once("Smarty/libs/Smarty.class.php"); 
 $smarty = new smarty(); 
 $smarty->templates_dir="templates"; 
 $smarty->templates_c_dir="templates_c"; 
 $smarty->left_delimiter="<{"; 
 $smarty->right_delimiter="}>"; 
 $smarty->assign("title","你成功了"); 
 $smarty->display("test.html"); 
 $content=$smarty->fetch("test.html"); 
 $fp=fopen("ok.html","w"); 
 fwrite($fp,$content); 
 fclose($fp); 
?>

相关文章

discuz图片顺序混乱解决方案

discuz图片顺序混乱解决方案

说明 discuz在发表帖子的时候,添加多张图片,然后直接发表帖子,图片顺序有时候会乱掉 即使上传图片窗口中图片顺序正确,发布之后还是会乱掉 分析 看url,程序代码中看不出什么 将图片...

PHP安全配置

PHP安全配置  一、Web服务器安全  PHP其实不过是Web服务器的一个模块功能,所以首先要保证Web服务器的安全。当然Web服务器要安全又必须是先保证系...

PHP定时更新程序设计思路分享

现在回想起来,我以前的想法是错误的,网页的执行流程  打开WEB页面 —- 加载HTML代码 (包括CSS,javascript)— 执行PHP代码 — 完成 粗约的就先理解...

PHP学习笔记之一

配置PHP以及MySQL的过程略去,如果在Ubuntu下,参考 Ubuntu 10.04 Installation Memo 即可。 1. 基本语法 要在HTML代码中嵌入PHP脚本的方...

php基于curl重写file_get_contents函数实例

本文实例讲述了php基于curl重写file_get_contents函数。分享给大家供大家参考,具体如下: file_get_contents在连接不上的时候会提示Connection...