我安装并配置了XAMPP。我正在尝试安装Smarty 3.1.18
,我遇到了一些问题。Windows 8.1 XAMPP和smarty
我已更改我的php.ini
文件以将smarty/libs目录添加到includes。 我解压到的Smarty我c:\smarty
文件夹 我做了我smarty\templates
和config
文件夹中htdocs文件夹 我还做了我的缓存和c:\smarty
文件夹内的文件夹templates_c
。 我使我的index.php
文件包含所有目录,并将我的index.tpl
文件放入我的模板文件夹中。 当我运行index.php
文件,我回到这一点:
Fatal error: Uncaught --> Smarty: Unable to load template file 'index.tpl' <-- thrown in C:\smarty\libs\sysplugins\smarty_internal_templatebase.php on line 127
任何想法?
我已运行testinstall()
脚本,这是它返回:
Smarty Installation test...
Testing template directory...
FAILED: .\templates\ does not exist.
Testing compile directory...
FAILED: .\templates_c\ does not exist.
Testing plugins directory...
C:\smarty\libs\plugins is OK.
Testing cache directory...
FAILED: .\cache\ does not exist.
Testing configs directory...
FAILED: .\configs\ does not exist.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.
我检查和复查我的文件位置和目录位置,这是他们在哪里:
$smarty->template_dir = 'c:/xampp/htdocs/smarty/templates';
$smarty->config_dir = ' c:/xampp/htdocs/smarty/config';
$smarty->cache_dir = 'c:/smarty/cache';
$smarty->compile_dir = 'c:/smarty/templates_c';
请提供您的代码如何设置模板目录为您Smarty类 –
确定何人编辑我的问题,现在没有任何意义...... – TedEBare1970