ChinaUnix.net
相关文章推荐:

smarty 使用php函数

大师兄smarty教程(修正版)——实例篇( 使用php内置MYSQL函数) 从本节开始我们来学习一下如果把smarty应用到实际的例子中. 为了演示说明,我将以前写的一个站点作为实例来讲来下.先说明一下, 我本人的美术功底不是很强,所以设计出来的页面不太好看,大家就对付着看吧 在看本文之前,可以先看看indexbak.htm与newsbak.htm,它们是我们生成后的例图。 一、 首先来说明一下我们将要使用到的数据库,下面我先将数据库源文件给大家例出来: ...

by tiredbee - php文档中心 - 2007-10-19 01:02:56 阅读(781) 回复(0)

相关讨论

smarty实例教程之三:----实例篇( 使用php内置MYSQL函数) [ 2006/08/28 22:18 | by chaizx ] 从本节开始我们来学习一下如果把smarty应用到实际的例子中. 为了演示说明,我将以前写的一个站点作为实例来讲来下.先说明一下, 我本人的美术功底不是很强,所以设计出来的页面不太好看,大家就对付着看吧 在看本文之前,可以先看看indexbak.htm与newsbak.htm,它们是我们生成后的例图。 一、 首先来说明一下我们将要使用到的数据库,下面...

by qiyu15555 - php文档中心 - 2006-10-30 18:15:07 阅读(906) 回复(0)

smarty技术是php的精髓所在,随着php版本的逐渐提高,原来的很多方法也许太过时了,下面我就针对最新的php5.1.1版本的使用,配置说说如何配置。 下面是一步步的来的,请注意: 1、在官方下载模板库文件: http://smarty.php.net/download.php 下载了就解压,看见一个文件夹了,是个 smarty.x.x,打开,里面有个libs 文件夹,ok,注意这个东西就是我们要的。 2、在你的网站目录下面,比方我的php网站IIS在物理 硬盘 的 d:/web/web/...

by sss0213 - php文档中心 - 2009-10-21 10:45:16 阅读(1424) 回复(0)

[CODE:] [color="#ff6600"] require_once('./Path.Setting.php'); require_once('./Setting.Inc.php'); require_once(QuiZ_Path.'../Classes/FileName_Set.php'); $link = new ExecSQL(); #SQL操作 $menu = new Menu_Class(); #菜单生成 $link -> SetSQL("Select * From ".Base::$Menu_Left." order by path"); $menu -> Set_Array($link -> Query_array()); $smarty -> assign('menu_select',$men...

by dongyue91 - php文档中心 - 2009-10-29 16:32:39 阅读(1483) 回复(0)

我们这个网站『U能网』的开发完全是使用smarty做的, 欢迎对这方面感兴趣的朋友一起聊聊 :lol:

by anson_x - PHP - 2006-03-25 21:44:56 阅读(1996) 回复(8)

一、什么是smarty? smarty是一个使用php写出来的模板php模板引擎,它提供了逻辑与外在内容的分离,简单的讲,目的就是要使用php程序员同美工分 离,使用的程序员改变程序的逻辑内容不会影响到美工的页面设计,美工重新修改页面不会影响到程序的程序逻辑,这在多人合作的项目 中显的尤为重要。 二、smarty优点: 1. 速度:采用smarty编写的程序可以获得最大速度的提高,这一点是相对于其它的模板引擎技术而言的。 2. 编译型:采用sm...

by shijiang1130 - Linux文档专区 - 2007-03-18 14:56:20 阅读(1090) 回复(0)

smarty.php中有如下代码: include_once('../smarty/smarty.class.php'); $smarty = new smarty(); $smarty ->template_dir = "../templates/"; //设置模板目录 $smarty ->compile_dir = "../souces/news/"; //设置目编辑目录 $smarty ->cache_dir = "../cache/"; //设置绶存 $smarty ->cache_lifetime = 60*60*24; //设置绶存时间 $smarty ->caching=false; $smarty ->force_compile=true;//强制重新生成编译文件 $smarty ->le...

by pets511 - PHP - 2013-05-08 15:55:51 阅读(2785) 回复(6)

?php /** * 函数:(Adodb + smarty) 内容列表分页 * 版本:最终(完美处理了导航链接) * 已通过Mysql、Oracle 测试 * 时间:2006/9/29 * 作者:欣然随风 * * 参数: * @table -- 表名 * @pageSize-- 每页信息数 * @midPage -- 导航链接数量 * @where -- 查询条件 * * 全局变量: * @conn -- 数据库操作object * @tpl -- 模板操作object * @start -- 返回的LIMIT的开始下标 * */ function page($table,$pageSize...

by liuxingyuyuni - php文档中心 - 2007-01-20 02:36:17 阅读(705) 回复(0)

函数: ?php /** * 函数:(Adodb + smarty) 内容列表分页 * 版本:最终(完美处理了导航链接) * 已通过Mysql、Oracle 测试 * 时间:2006/9/29 * 作者:欣然随风 * * 参数: * @table -- 表名 * @pageSize-- 每页信息数 * @midPage -- 导航链接数量 * @where -- 查询条件 * * 全局变量: * @conn -- 数据库操作object * @tpl -- 模板操作object * @start -- 返回的LIMIT的开始下标 * */ function page($table,$pa...

by xrsf - php文档中心 - 2006-03-11 04:55:15 阅读(875) 回复(0)

我第一次使用,出现这个问题,请问怎么办呢 Warning: main(../libs/smarty.class.php): failed to open stream: No such file or directory in d:\usr\www\html\test\index.php on line 3 Fatal error: main(): Failed opening required '../libs/smarty.class.php' (include_path='.;c:\php4\pear') in d:\usr\www\html\test\index.php on line 3

by justinyun - PHP - 2008-05-26 21:01:13 阅读(2882) 回复(9)

?php require_once('./FCKeditor/fckeditor.php'); require_once('./smarty/smarty.class.php'); //载入smarty $smarty = new smarty(); /* smarty配置 */ $smarty->template_dir = "./templates/default"; $smarty->compile_dir = "./templates/compiled"; // $smarty->config_dir = "./templates/configs"; // $smarty->cache_dir = "./caches"; $smarty->left_delimiter = '{'; $smarty->right_delimiter = '/}'; createEdito...

by lib - php文档中心 - 2007-02-11 23:26:24 阅读(671) 回复(0)