我的smarty已经连接好了 ,但是我这个写好之后,我在index.htm中写了“原始内容:{$name};”那么在index.php中应该显示“原始内容:it is a hard work,and you must keep on。”才对的,但是我的显示是“原始内容:$name.”
<?php
/*
* Created on 2010-10-18
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include("smarty_inc.php");
$value="it is a hard work,and you must keep on.";
$smarty->assign("name",$value);
$smarty->display("index.htm");?>
请高手帮我看是怎么会事的,好像这个assign就没有起作用。
<?php
/*
* Created on 2010-10-18
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include("smarty_inc.php");
$value="it is a hard work,and you must keep on.";
$smarty->assign("name",$value);
$smarty->display("index.htm");?>
请高手帮我看是怎么会事的,好像这个assign就没有起作用。
include_once("smarty/smarty.class.php");
$smarty=new 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";
$smarty->left_delimiter="{";
$smarty->right_delimiter="}";?>