日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php smarty 手册下载,smarty教程

發布時間:2023/12/14 php 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php 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編譯文件按照行號找出相應錯誤。

總結

以上是生活随笔為你收集整理的php smarty 手册下载,smarty教程的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。