原系统使用的是php4现在因为服务器更新调整为php5,所以需要对原来的代码进行修改。但是现在遇到了一个问题,不清楚是哪里造成的希望得到大家的指点。错误如下:
httpd的log文件 error_log中错误描述为:[Tue Oct 18 03:39:30 2011] [error] [client 116.3.5.116] PHP Notice: Undefined index: PHPSESSID in /home/sksato/wwwroot/include/common.php on line 18common.php的第18行处代码为:if($_GET[session_name()]){
header('Location: '.XOOPS_URL.'/');
exit();
}小弟不清楚 为什么会出 PHP Notice: Undefined index: PHPSESSID 这个错误,请求指点迷津!
httpd的log文件 error_log中错误描述为:[Tue Oct 18 03:39:30 2011] [error] [client 116.3.5.116] PHP Notice: Undefined index: PHPSESSID in /home/sksato/wwwroot/include/common.php on line 18common.php的第18行处代码为:if($_GET[session_name()]){
header('Location: '.XOOPS_URL.'/');
exit();
}小弟不清楚 为什么会出 PHP Notice: Undefined index: PHPSESSID 这个错误,请求指点迷津!
header('Location: '.XOOPS_URL.'/');
exit();
}
这种取SESSION方式已经过时了
header('Location: '.XOOPS_URL.'/');
exit();
}是否可以达到目的呢?
你把它设置成一致就可以了一般 php4 的环境都设置成这样
error_reporting = E_ALL & ~E_NOTICE
你在 php5 中也设置成这样就可以了