导入模版就出现这个 Notice: Undefined offset: 0 in F:\PHPnow\htdocs\include.php on line 24
20 if($forum_alias[$args[0]]){
21 $fid=$forum_alias[$args[0]];
22 unset($args[0]);
23 $args=array_values($args);
24 if($args[0]){ (此处24行)
25 if(is_numeric($args[0])){
26 $page=(int)$args[0];
27 unset($args[0]);
28 $args=array_values($args);
--------------------------------------------------------------------------下面是整个页面源码,24行已经加色了
<?php
define('THIS_ROOT',dirname(__FILE__).DIRECTORY_SEPARATOR);
if($qstr=$_SERVER['QUERY_STRING']){
$qstr2=$qstr;
substr($qstr2,0,1)=='/'&&$qstr2=substr($qstr2,1);
substr($qstr2,strlen($qstr2)-1,1)!='/'&&($qstr2.='/');
if(file_exists(THIS_ROOT.'./'.$qstr2.'index.php')){
include THIS_ROOT.'./'.$qstr2.'index.php';
exit;
}
unset($qstr2);
if($sp=explode('/',$qstr)){
foreach($sp as $v)$v!=''&&$args[]=$v;
unset($sp);
if($args){
@include THIS_ROOT.'./forumdata/cache/cache_forum_alias.php';
@include THIS_ROOT.'./forumdata/cache/cache_categories_alias.php';
@include THIS_ROOT.'./forumdata/cache/cache_thread_cate_alias.php';
if($forum_alias){
if($forum_alias[$args[0]]){
$fid=$forum_alias[$args[0]];
unset($args[0]);
$args=array_values($args);
if($args[0]){ (此处24行)
if(is_numeric($args[0])){
$page=(int)$args[0];
unset($args[0]);
$args=array_values($args);
}
else {
if(count($args)%2==1){
if($categories_alias[$args[0]]){
$filter='sort';
$sortid=$categories_alias[$args[0]];
unset($args[0]);
$args=array_values($args);
} elseif($thread_cate_alias[$args[0]]){
$filter='type';
$typeid=$thread_cate_alias[$args[0]];
unset($args[0]);
$args=array_values($args);
}
}
}
}
if($args){
if(count($args)%2==1){
unset($args[0]);
$args=array_values($args);
}
}
if($args){
$args_count=count($args);
for($i=0;$i<$args_count;$i+=2){
if(!is_numeric($args[$i]))$vars[$args[$i]]=$args[$i+1];
}
unset($args_count);
unset($args);
unset($i);
if($vars){
extract($vars);
unset($vars);
}
}
include THIS_ROOT.'./forumdisplay.php';
} else {
if(file_exists(THIS_ROOT.'./404.htm'))require(THIS_ROOT.'./404.htm');
else echo '404';
}
}
}
}
}
?>
麻烦指点下,。回复,或者QQ 190 517 |