我用smarty模板引擎,用DM做了index.php,index.tpl,代码如下,请高手帮我看下
安装Apmserv的路径D:\APMServ5.2.6\APMServ5.2.6\www\htdocs\Izuoconfig.php<?phpdefine('BASE_P...
安装Apmserv的路径 D:\APMServ5.2.6\APMServ5.2.6\www\htdocs\Izuo
config.php
<?php
define('BASE_PATH','D:\APMServ5.2.6\APMServ5.2.6\www\htdocs\\');
define('SMARTY_PATH','\Izuo\smarty\\');
require BASE_PATH.SMARTY_PATH.'Smarty.class.php';
$smarty = new Smarty;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
?>
index.php
<?php
define('BASE_PATH',$_SERVER['DOCUMENT_ROOT']);
define('SMARTY-PATH','\Izuo\smarty\\');
require BASE_PATH.SMARTY_PATH.'Smarty.class.php';
$smarty=new Smarty;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
$smarty->assign('title','这是一个SMARTY程序');
$smarty->assign('content','Hello,Welcome to stduy\'Smarty\'!');
$smarty->display('index.tpl');
?>
错误提示:Warning: require(D:/APMServ5.2.6/APMServ5.2.6/www/htdocsSMARTY_PATHSmarty.class.php)
[function.require]: ...\Izuo\index.php on line 4
Fatal error: require() [function.require]: Failed opening required '
/www/htdocsSMARTY_PATHSmarty.class.php'
(include_path='.;C:\php5\pear') in D:\...\Izuo\index.php on line 4 展开
config.php
<?php
define('BASE_PATH','D:\APMServ5.2.6\APMServ5.2.6\www\htdocs\\');
define('SMARTY_PATH','\Izuo\smarty\\');
require BASE_PATH.SMARTY_PATH.'Smarty.class.php';
$smarty = new Smarty;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
?>
index.php
<?php
define('BASE_PATH',$_SERVER['DOCUMENT_ROOT']);
define('SMARTY-PATH','\Izuo\smarty\\');
require BASE_PATH.SMARTY_PATH.'Smarty.class.php';
$smarty=new Smarty;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
$smarty->assign('title','这是一个SMARTY程序');
$smarty->assign('content','Hello,Welcome to stduy\'Smarty\'!');
$smarty->display('index.tpl');
?>
错误提示:Warning: require(D:/APMServ5.2.6/APMServ5.2.6/www/htdocsSMARTY_PATHSmarty.class.php)
[function.require]: ...\Izuo\index.php on line 4
Fatal error: require() [function.require]: Failed opening required '
/www/htdocsSMARTY_PATHSmarty.class.php'
(include_path='.;C:\php5\pear') in D:\...\Izuo\index.php on line 4 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询