刚刚下了smarty,但是好像这个解压包有问题,因为我调试程序是不对,代码应该没有问题,smarty文件前有(!)号。
//smarty_inc.php
<?php
include_once("Smarty/Smarty.class.php"); //包含smarty类文件$smarty = new Smarty(); //建立smarty实例对象$smarty$smarty->config_dir="Smarty/Config_File.class.php";  // 目录变量$smarty->caching=false; //是否使用缓存,项目在调试期间,不建议启用缓存$smarty->template_dir = "./templates"; //设置模板目录$smarty->compile_dir = "./templates_c"; //设置编译目录$smarty->cache_dir = "./smarty_cache"; //缓存文件夹//index.php
<?php
/*
* 0000000000000000
*
* www.php100.com剪辑器教程
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/include("smarty_inc.php");
$name="php中文站";
$smarty->assign("title",$name);
$smarty->display("index.htm");?>index.htm
<html><b>{$title}</b></html>