admin/index.php裡\r
加了那段 //Check for new version 後, 整個控制台主頁都進不了去....等了很久後便出現什麼 bad gateway找不到網頁的字句...
另外升級後 "同步附加檔案 "也不能操作, 又是等了很久後便出現什麼 bad gateway找不到網頁的字句...
請問有什麼地方改錯了?
代碼: 選擇全部
#
#-----[ OPEN ]---------------------------------------------
#
admin/index.php
#
#-----[ FIND ]---------------------------------------------
# Line 562
"L_NO_GUESTS_BROWSING" => $lang['No_users_browsing'])
);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Check for new version
$current_version = explode('.', '2' . $board_config['version']);
$minor_revision = (int) $current_version[2];
$errno = 0;
$errstr = $version_info = '';
if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr))
{
@fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1
");
@fputs($fsock, "HOST: www.phpbb.com
");
@fputs($fsock, "Connection: close
");
$get_info = false;
while (!@feof($fsock))
{
if ($get_info)
{
$version_info .= @fread($fsock, 1024);
}
else
{
if (@fgets($fsock, 1024) == "
")
{
$get_info = true;
}
}
}
@fclose($fsock);
$version_info = explode("
", $version_info);
$latest_head_revision = (int) $version_info[0];
$latest_minor_revision = (int) $version_info[2];
$latest_version = (int) $version_info[0] . '.' . (int) $version_info[1] . '.' . (int) $version_info[2];
if ($latest_head_revision == 2 && $minor_revision == $latest_minor_revision)
{
$version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>';
}
else
{
$version_info = '<p style="color:red">' . $lang['Version_not_up_to_date'];
$version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>';
}
}
else
{
if ($errstr)
{
$version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>';
}
else
{
$version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>';
}
}
$version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>';
$template->assign_vars(array(
'VERSION_INFO' => $version_info,
'L_VERSION_INFORMATION' => $lang['Version_information'])
);