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

相关文章

使用PHP编写的SVN类

复制代码 代码如下:<?php/** * SVN 外部命令 类 * * @author rubekid * * @todo com...

抓取YAHOO股票报价的类

复制代码 代码如下:<? function getYahooQuote($stockSymbol = "CCR") { if (!$targetURL) $targetURL =...

PHP 反向排序和随机排序代码

array_reverse()函数与shuffle()函数介绍 array_reverse() array array_reverse(array)array_reverse()函数传入...

php性能分析之php-fpm慢执行日志slow log用法浅析

本文实例讲述了php性能分析之php-fpm慢执行日志slow log用法。分享给大家供大家参考,具体如下: 众所周知,mysql有slow query log,根据慢查询日志,我们可以...

PHP 得到根目录的 __FILE__ 常量

1。PHP 的 __FILE__ 常量(如何得到根目录) dirname(__FILE___) 函数返回的是脚本所在在的路径。 比如文件 ...