Smarty配置错误???
smarty吧
全部回复
仅看楼主
level 1
阿小我2Q 楼主
配置文件
Config.php
<?php
define('SMARTY_DIR','F:\USBWebserver\root\smarty\libs\');
require (SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = SMARTY_DIR.'\templates';
$smarty->config_dir = SMARTY_DIR.'\configs';
$smarty->cache_dir = SMARTY_DIR.'\cache';
$smarty->compile_dir = SMARTY_DIR.'\templates_c';
?>
index.php
<?php
error_reporting(E_ALL ^ E_NOTICE);
include('F:\USBWebserver\root\smarty\configs\Config.php');
$smarty->display('1.tpl');
?>
Parse error: syntax error, unexpected 'Smarty' (T_STRING) in F:\USBWebserver\root\smarty\configs\Config.php on line 3
如果直接require('F:\USBWebserver\root\smarty\libs\Smarty.class.php');没有问题,但是为什么上面定义的SMARTY_DIR就不行呢?
2015年10月19日 00点10分 1
level 2
自信就是这么简单
2015年10月30日 05点10分 2
1