欧普下载是国内较新、较齐、较安全的软件下载基地!
当前位置:首页 ›› 其他软件 ›› 电子书籍 ›› smarty完全中文手册下载

smarty完全中文手册

smarty教程[下载地址]
smarty完全中文手册

smarty完全中文手册也就是smarty教程,smarty是比较常用的模板编译引擎,次手册包含模板设计者篇和模板程序员篇两个部分,从多方位分析了smarty的高级特点,用户彻底了解smarty的功能和使用方法,有需要的朋友可以下载参考。

smarty完全中文手册

手册简介:

smarty手册是php模板引擎的一个中文说明文档,当我们遇上了许多的技术难题的同时,“什么是模板应该做的,什么不该做”这个问题,也被热烈的讨论着。从这些经验,我们决定应该用Php将模板引擎写成一个类,让任何觉得合适的人使用它。所以我们写了一个引擎,从此就有了smarty.

常见问题解答

Smarty/PHP errors错误

Smarty can catch many errors such as missing tag attributes or malformed variable names. If this happens, you will see an error similar to the following:

Smarty能够发现许多类似缺少标签属性或者不规范变量名这样的错误。如果发生这种错误,就会有下面的错误提示:

Example 17-1. Smarty errors错误

Warning: Smarty: [in index.tpl line 4]: syntax error: unknown tag - '%blah'

in /path/to/smarty/Smarty.class.php on line 1041

警告:Smarty: 在index.tpl文件第4行,语法错误:'%blah'标签未知

Fatal error: Smarty: [in index.tpl line 28]: syntax error: missing section name

in /path/to/smarty/Smarty.class.php on line 1041

严重错误:Smarty: 在index.tpl文件第28行,语法错误:缺少节段名字在 /path/to/smarty/路径中的Smarty.class.php文件1041行

Smarty shows you the template name, the line number and the error. After that, the error consists of the actual line number in the Smarty class that the error occured.

Smarty可以显示模板名称以及行号和错误。这些错误显示未所发生错误所属的smarty类所在的实际行号。

There are certain errors that Smarty cannot catch, such as missing close tags. These types of errors usually end up in PHP compile-time parsing errors.

某些错误Smarty不能捕捉,像缺少结束标签。这些类型的错误通常会在在php分析语法错误的编译时间中就捕捉出来了.

Example 17-2. PHP parsing errors

Parse error: parse error in /path/to/smarty/templates_c/index.tpl.php on line 75

When you encounter a PHP parsing error, the error line number will correspond to the compiled PHP script, not the template itself. Usually you can look at the template and spot the syntax error. Here are some common things to look for: missing close tags for {if}{/if} or {section}{/section}, or syntax of logic within an {if} tag. If you can't find the error, you might have to open the compiled PHP file and go to the line number to figure out where the corresponding error is in the template.

当你遇到一个php解析错误时,错误行号将反应到php编译脚本,而不是模板本身。通常,你会看到模板并发现语法错误。通常会发现:缺少if}{/if} 或者

{section}{/section}的结束标签。或者{if}标签内的逻辑语法错误。如果你不能检查出错误,那就得在模板中打开php编译文件按照行号找出相应错误。

下载smarty完全中文手册
本地下载地址:
本地电信下载
本地电信下载
本地联通下载
本地联通下载
本地迅雷下载
本地迅雷下载
移动用户下载
移动用户下载

版权声明:本站提的序列号、注册码、注册机、补丁等均来自互联网,仅供学习交流之用,请在下载后24小时内删除。

相关文章
软件评论
请自觉遵守互联网相关政策法规,评论内容只代表网友观点,与本站立场无关!
    登录   注册