我安裝並配置了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