怎么我的Smarty不能用
这个是Smarty.php代码
<?php<br />define("ROOT", str_replace("\\", "/",dirname(__FILE__)).'/');<br />require_once ROOT.'libs/Smarty.class.php';<br />$smarty=new Smarty();<br />$smarty->setTemplateDir(ROOT."tpl");<br />$smarty->setCompileDir(ROOT."plusion/templates_c/");<br />$smarty->setConfigDir(ROOT."plusion/configs/");<br />$smarty->setCacheDir(ROOT."plusion/cache/");<br />$smarty->debugging = false;<br />$smarty->left_delimiter = '<{';<br />$smarty->right_delimiter = '}>';<br />?>
<?<br /><br />require "smarty.php";<br />$smarty->assign("title" , "smarty模板技术");//编辑器提示BUG未定义的变量$smarty,搞不懂上面require进去了,还怎么报这个错<br />$smarty->assign("content","通过详细的安装使用步骤为你展示smarty模板技术");<br />$smarty->display("test.html");<br />?>
<html><br /><head><br /><meta http-equiv="Content-type" content="text/html"; charset="utf-8"><br /><title> <br /><{$title}><br /></title> <br /></head> <br /><body> <br /><{$content}> <br /></body> <br /></html>
<?php<br /> <br />require "smarty.php";<br />$smarty->assign("title" , "smarty模板技术");//编辑器提示BUG未定义的变量$smarty,搞不懂上面require进去了,还怎么报这个错<br />$smarty->assign("content","通过详细的安装使用步骤为你展示smarty模板技术");<br />$smarty->display("test.html");<br />?>
<?<br /> <br />require "smarty.php";<br />$smarty->