我这个smarty配置怎么了
目录结构如下: smarty_pro1
---libs
---config
---templates (这里放了个,index.tpl)
---templates_c
---cache
index.php
index.php 里的内容为
define('SMARTY_PATH','../smarty_pro1/');
include_once(SMARTY_PATH.'libs/Smarty.class.php');
$smarty=new Smarty();
$smarty->template_dir= SMARTY_PATH.'templates/';
$smarty->compile_dir= SMARTY_PATH.'templates_c/';
$smarty->config_dir= SMARTY_PATH.'configs/';
$smarty->cache_dir= SMARTY_PATH.'cache/';
$smarty->left_delimiter='{';
$smarty->right_delimiter='}';
$smarty->assign('title','测试一下');
$smarty->assign('content','内容');
$smarty->display('index.tpl');
?>
index.tpl内容为
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号