A-A+

Smarty中文手册下载

2012年10月13日 PHP教程下载 暂无评论 阅读 216 views 次

Smarty是一个非常著名的使用PHP写出来的模板引擎,主要分离了逻辑代码和外在的内容,提供了一种易于管理和使用的方法,用Smarty模板引擎做企业网站非常的方便,而且可以设置生成缓存文件,大大提高了网页打开速度,Smarty模板引擎功能如此的强大,当然Smarty模板引擎标签也是非常庞大的,对于这些标签,使用跟php语言的用法都是相通的,而要记住这些标签却不是一件很容易的事情,所以php程序员手里一定要有一个适合自己的Smarty模板引擎中文手册,使用时随时查阅,可以大大提高自己的工作效率! 唯一的缺点就是:虽然说的是中文手册,但基本上都是中英对照的,看起来不是很方便~

Smarty中文手册部分文件:

例 2-2.创建Smarty实例

require('Smarty.class.php');
$smarty = new Smarty;

Try running the above script. If you get an error saying the Smarty.class.php file could not be found, you have to do one of the following:

试着运行一下以上脚本,如果你发现"未找到Smarty.class.php 文件"的错误时,你应该这样做:Example 2-3. Supply absolute path to library file

例 2-3.加入库文件目录的绝对路径

require('/usr/local/lib/php/Smarty/Smarty.class.php');
$smarty = new Smarty;
Example 2-4. Add library directory to php_include path

例 2-4.在include_path加入库文件目录

// Edit your php.ini file, add the Smarty library
// directory to the include_path and restart web server.
// Then the following should work:
require('Smarty.class.php');
$smarty = new Smarty;

点击进行下载>>

给我留言