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); 
?>

相关文章

探讨fckeditor在Php中的配置详解

前言:  FCKeidtor是个国外的多语言编辑器,你可以对其配置文件进行简单修改使之支持目前常用Web开发语言的应用,下面我就讲讲FCKeditor的最新版本2.4.2在php的具体配...

php实现的简单数据库操作Model类

本文实例讲述了php实现的简单数据库操作Model类。分享给大家供大家参考,具体如下: 该数据库模型类可实现数据库的增删改查,简化数据库操作。 1. config.php代码: &l...

PHP 之Section与Cookie使用总结

SESSION与COOKIE区别:   Session 将信息保存在服务器上.服务器在接受到唯一的SESSION_ID后,根据这个ID获取相关数据,然后将信息传递到客户端(浏览器).  ...

php简单防盗链验证实现方法 原创

这里分析了php的简单防盗链实现方法。分享飞大家供大家参考。具体如下: index.php页面如下: <html> <head> <meta http-...

将FCKeditor导入PHP+SMARTY的实现方法

本文实例讲述了将FCKeditor导入PHP+SMARTY的实现方法。分享给大家供大家参考。具体分析如下: 提取Fckeditor时,采用如下,PHP用$_POST['p_info']得...