第一次运用smarty出错来看看吧!大侠们 设置template目录有可读写权限 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php include ("./Smarty/libs/Smarty.class.php");//包含smarty类文件$smarty = new Smarty(); //建立smarty实例对象$smarty$smarty->template_dir = './templates';$smarty->compile_dir = './templates_c';$smarty->config_dir = './configs';$smarty->cache_dir = './cache';$smarty->caching = false;$smarty->left_delimiter = "<{"; $smarty->right_delimiter = "}>";$smarty->assign("title", "垃圾"); //进行模板变量替换$smarty->assign("content","测试用的网页内容00"); //编译并显示位于./templates下的index.tpl模板$smarty->display("index.tpl"); //index.tpl ?> 应该是保证templates_c有读写权限,在templates\index.tpl这个文件确定存在的前提下。 呵呵,好久没在windows下面配置了,好像是共享该文件夹并且允许everyone r/w吧(其实应该是给通过IIS访问的用户权限,但everyone简便些,呵呵)linux下面就chmod templates_c 777就可以了 用file上传文件,在tmp目录下找不到文件 MySQL client version版本低下会出现什么情况 问个php中使用fckeditor的问题 onclick 控制两个文本框内容 pear无法安装,希望大家能帮忙解决,谢谢 【仅限深圳本地】PHP高手来——付费建站&长期兼职合作! config.php的加载问题 [原创] 重新构造PHP内置的字符串处理函数 (未完) $db->query_first的简单问题,紧急求助!!!!多谢各位大侠!! session??奇怪?? 求一关于编码的正则 在win2003上装mysql5.X 死活都链接不上,请教是什么问题?
include ("./Smarty/libs/Smarty.class.php");//包含smarty类文件
$smarty = new Smarty(); //建立smarty实例对象$smarty
$smarty->template_dir = './templates';
$smarty->compile_dir = './templates_c';
$smarty->config_dir = './configs';
$smarty->cache_dir = './cache';
$smarty->caching = false;
$smarty->left_delimiter = "<{";
$smarty->right_delimiter = "}>";
$smarty->assign("title", "垃圾"); //进行模板变量替换
$smarty->assign("content","测试用的网页内容00");
//编译并显示位于./templates下的index.tpl模板
$smarty->display("index.tpl"); //index.tpl
?>