我在 localhost 中升级/安装PHP 5.4.4
(xampp 1.8.0)。现在我notice error
在我的页面上看到了很多。什么问题?如何解决这个问题?
错误部分:
Notice: Undefined index: language in C:\xampp\htdocs\tube\include\config.php on line 93
Notice: Undefined variable: max_avatar_width in C:\xampp\htdocs\tube\include\lang\english.php on line 495
Notice: Undefined variable: max_avatar_height in C:\xampp\htdocs\tube\include\lang\english.php on line 496
Notice: Undefined index: USERID in C:\xampp\htdocs\tube\index.php on line 26
配置 PHP 页面:
if ($_REQUEST['language'] != '') // <---- Line 93
{
if ($_REQUEST['language'] == 'english')
{
$_SESSION['language'] = 'english';
}
elseif ($_REQUEST['language'] == 'spanish')
{
$_SESSION['language'] = 'spanish';
}
}
if ($_SESSION['language'] == "")
{
$_SESSION['language'] = "english";
}
if ($_SESSION['language'] == "english")
{
include("lang/english.php");
}
elseif ($_SESSION['language'] == "spanish")
{
include("lang/spanish.php");
}
else
{
include("lang/english.php");
}
英语朗页(第 495 和 496 行):
$lang['491'] = "The image width is too big. Max width is $max_avatar_width pixels.";
$lang['492'] = "The image height is too big. Max height is $max_avatar_height pixels.";
索引 PHP 页面:
if($_SESSION['USERID'] == "") // <-- Line 26
{
$showfamfilter = "AND mature='0'";
}
elseif($_SESSION['FAMILYFILTER'] == "0")
{
$showfamfilter = "";
}
else
{
$showfamfilter = "AND mature='0'";
}