最新文章列表

Smarty使用section语句循环输出数组

一 代码 index.php <?php include("../config.php"); $obj = array( array("id" => 1, "bigclass" => "计算机图书","smallclass" => arra ...
cakin24 评论(0) 有891人浏览 2017-06-19 20:58

Smarty使用foreach语句循环输出数组

一 代码 index.php <?php include_once '../config.php'; $infobook = array('object'=>'book','type'=>'computer','name'=>'PHP从入门到精通','publishing'=>'清华大学出版社'); $smarty->assign('tit ...
cakin24 评论(0) 有884人浏览 2017-06-18 06:19

Smarty的条件判断

一  代码 index.php <?php include_once "../config.php"; $smarty->assign("title","if条件判断语句"); $smarty->display("6/index.tpl"); ?>   index. ...
cakin24 评论(0) 有682人浏览 2017-06-18 06:17

Smarty读取配置文件

一 代码 config文件 title = "调用配置文件" bgcolor = "#f0f0f0" border = "5" type = "计算机类" name = "PHP从入门到精通" tpl模板文件 {config_load file="4.conf ...
cakin24 评论(0) 有792人浏览 2017-06-18 06:11

Smarty的变量调节器

一 代码 index.php <?php include_once "../config.php"; $str1 = '这是一个实例。'; $str2 = "\n图书->计算机类->php\n书名:《php从入门到精通》"; $str3 = "\n价格:¥59/本。"; $smarty-> ...
cakin24 评论(0) 有499人浏览 2017-06-18 06:10

Smarty的保留变量

一 代码 index.php <?php include '../config.php'; $smarty->assign('title','Smarty保留变量'); $smarty->display('3/index.tpl'); ?>   index.tpl <!DOCTYPE html PUBLIC "-//W3C// ...
cakin24 评论(0) 有806人浏览 2017-06-18 06:02

Smarty模板文件中的一般变量

一 代码 index.php <?php include_once("../config.php"); //调用Smarty类库文件 $arr = array('computerbook','name' => 'PHP从入门道具精通','unit_price' => array('price' => '¥65.00','unit' =&g ...
cakin24 评论(0) 有760人浏览 2017-06-17 04:46

第一个Smarty程序

一 代码结构 二 代码 index.php <?php /* 定义服务器的绝对路径 */ define('BASE_PATH',$_SERVER['DOCUMENT_ROOT']); /* 定义Smarty目录的绝对路径 */ define('SMARTY_PATH','\test\29\1\Smarty\\'); /* 加载Smarty类库文件 ...
cakin24 评论(0) 有710人浏览 2017-06-17 04:43

在Zend Studio 10.6中安装SmartPDT 0.9.1出错后的解决方式

      在Zend Studio 10.6上安装SmartyPDT 0.9.1时,遇到错误报告,包含类似下面的内容:    Missing requirement: Smarty Feature 0.91.0    (org.eclipse.php.smarty_feature.feature.group 0.91.0)    requires 'org.eclipse.php 0 ...
xwv 评论(0) 有2083人浏览 2014-05-05 21:58

PHP smarty Autoloader 问题

很长时间没做PHP开发,刚刚在开发过程中发现使用了 Smarty 3.1.14 后,原先写的PHP __autoload 不能使用,查看很久发现这个版本的smary里面使用 spl_autoload_register 已经注册了一个 __autoload vim Smarty.class.php  +83 if (SMARTY_SPL_AUTOLOAD && set_in ...
erntoo 评论(0) 有864人浏览 2013-10-14 16:09

Smarty模板继承

模板继承 继承是从面向对象编程而来的概念,模板继承可以让你定义一个或多个父模板,提供给子模板来进行扩展。 扩展继承意味着子模板可以覆盖 ...
dcj3sjt126com 评论(0) 有1109人浏览 2012-12-20 11:33

smarty笔记

  smarty的常用功能及配置   配置使用部分:   # 修改默认的定界符 默认的定界符为{},可以在/includes/smarty_config.php中加入: $tpl->left_delimiter = "<?"; $tpl->right_delimiter = "?>"; 这样就把定界符改为了<? ...
dcj3sjt126com 评论(0) 有2257人浏览 2012-12-18 00:07

在smarty中用truncate来智能截取含有中英文的字符串以及如何避免截取中文乱码问题

  扩展smarty,自己新建一个文件,写个函数,放在 plugins/目录下 修改后的smartTruncate: 文件名:modifier.smartTruncate.php  内容如下:   <?php function smarty_modifier_smartTruncate($string, $length = 80, $etc = '...',$break_wor ...
dcj3sjt126com 评论(0) 有1866人浏览 2012-11-16 09:24

在SMARTY中使用变量

  获取变量的方式 1) 模板中的注释        模板注释被*号包围,例如  < { *  this is a comment   *  }  > 2) 从php文件中分配过来的变量 ...
dcj3sjt126com 评论(0) 有2013人浏览 2012-11-16 09:24

php模板引擎Smarty学习笔记(全)

  好久没写博客了。最近忙着毕业的事,正在准备着一月份的答辩,系统已经做得差不多了,毕业论文初稿也写得差不多了,接下来估计就是论文修修补补了。本来想要去找工作的,但是学校不准,说是必须要留在学校里搞答辩的事。另外,老师那儿的一些项目还要收尾。就只能再待一个月了。 说到找工作,暑假的时候本打算去杭州找找的,因为那儿的IT技术比较发达,起码比起我现在所在的城市要成熟很多。但是也不知道怎么回事,关键时 ...
348725767 评论(0) 有2130人浏览 2012-11-14 17:11

smarty 保留变量:循环索引,请求,常量

smarty的保留变量:保留变量可以被用于访问一些特殊的模板变量.smarty打印保留变量:在模板中如果要将smarty的一些保留字作为语言的内容显示出来,如显示分隔符,(默认为{})可用以下几种方法:方法一:{ldelim},{rdelim}
dcj3sjt126com 评论(0) 有1448人浏览 2012-10-31 16:07

SAE部署Smarty出现:Uncaught exception 'SmartyException' with message 'unable to write

  对于SAE出现的问题:Uncaught exception 'SmartyException' with message 'unable to write file...。 官方给出了详细的FAQ:http://sae.sina.com.cn/?m=faqs&catId=11#show_213 解决方案为:  
dcj3sjt126com 评论(0) 有3736人浏览 2012-10-25 10:07

Smarty配置(标准分析)

详情请参考:【Software Myzone】:http://www.firedragonpzy.com.cn/index.php/archives/2004
fireDragonpzy 评论(0) 有576人浏览 2012-10-17 08:44

CodeIgniter支持smarty,并配置支持layout

以插件形式加入smarty. 根据CI的规则。 下载smarty,并将其放到application/libraries/smarty下。 新建Cismarty.php,放在application/libraries下   [php:showcolumns:firstline[1]] view plaincopy
abc123456789cba 评论(0) 有1410人浏览 2012-10-10 17:01

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics