phpnow 搭建的网站首页出现提示notice
提示:Notice:UseofundefinedconstantPRC-assumed'PRC'inD:\Download\PHPnow-1.5.6\htdocs\com...
提示:Notice: Use of undefined constant PRC - assumed 'PRC' in D:\Download\PHPnow-1.5.6\htdocs\common.inc.php on line 4
Notice: Constant APP_PATH already defined in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 3
Notice: Undefined index: c in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 11
Notice: Undefined index: a in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 12
源码:
<?php
include_once('common.inc.php');
define('APP_PATH',"http://localhost");
//初始化Smarty
require_once(SYSPATH.'/view/Smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir=SYSPATH.'/view/tpl';
$smarty->compile_dir = SYSPATH.'/view/tpl_c';
//根据url的c和a定位控制器
$C=$_GET['c']?ucfirst(strtolower(@$_GET['c'])):'Index';
$A=$_GET['a']?ucfirst(strtolower(@$_GET['a'])):'init';
$controller_path = SYSPATH.'/action/'.$C.'Action.class.php';
require_once($controller_path);
$controller = new $C;
$controller->$A();
?> 展开
Notice: Constant APP_PATH already defined in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 3
Notice: Undefined index: c in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 11
Notice: Undefined index: a in D:\Download\PHPnow-1.5.6\htdocs\index.php on line 12
源码:
<?php
include_once('common.inc.php');
define('APP_PATH',"http://localhost");
//初始化Smarty
require_once(SYSPATH.'/view/Smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir=SYSPATH.'/view/tpl';
$smarty->compile_dir = SYSPATH.'/view/tpl_c';
//根据url的c和a定位控制器
$C=$_GET['c']?ucfirst(strtolower(@$_GET['c'])):'Index';
$A=$_GET['a']?ucfirst(strtolower(@$_GET['a'])):'init';
$controller_path = SYSPATH.'/action/'.$C.'Action.class.php';
require_once($controller_path);
$controller = new $C;
$controller->$A();
?> 展开
2个回答
展开全部
跟phpnow没关系,$_GET['c']换成isset($_GET['c']),$_GET['a']也是,define('APP_PATH',"http://localhost")这行注释掉
追问
首先非常感谢您的解答、现在改完还有一个提示没有去掉Notice: Use of undefined constant PRC - assumed 'PRC' in D:\Download\PHPnow-1.5.6\htdocs\common.inc.php on line 4
这个。。。。希望您帮忙,谢谢
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家可靠的代理服务提供商,提供原生IP(住宅原生IP)和高匿名代理服务。以下是关于StormProxies的原生IP服务的一些信息:1. 住宅原生IP:StormProxies提供的住宅原生IP是指从真实的家庭或企...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询