在該會員的資料上方會出現\r
Warning: opendir(../../language): failed to open dir: Invalid argument in g:\appserv\www\phpbb2\includes\functions_selects.php on line 31
Warning: readdir(): supplied argument is not a valid Directory resource in g:\appserv\www\phpbb2\includes\functions_selects.php on line 34
Warning: closedir(): supplied argument is not a valid Directory resource in g:\appserv\www\phpbb2\includes\functions_selects.php on line 45
而且"會員名稱"這四個字會不見
不過如果是在站台上方的個人資料看卻沒問題
底下是functions_selects.php的27~59行
代碼: 選擇全部
function language_select($default, $select_name = "language", $dirname="language")
{
global $phpEx, $phpbb_root_path;
$dir = opendir($phpbb_root_path . $dirname);
$lang = array();
while ( $file = readdir($dir) )
{
if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)))
{
$filename = trim(str_replace("lang_", "", $file));
$displayname = preg_replace("/^(.*?)_(.*)$/", "\\\1 [ \\\2 ]", $filename);
$displayname = preg_replace("/\[(.*?)_(.*)\]/", "[ \\\1 - \\\2 ]", $displayname);
$lang[$displayname] = $filename;
}
}
closedir($dir);
@asort($lang);
@reset($lang);
$lang_select = '<select name="' . $select_name . '">';
while ( list($displayname, $filename) = @each($lang) )
{
$selected = ( strtolower($default) == strtolower($filename) ) ? ' selected="selected"' : '';
$lang_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
}
$lang_select .= '</select>';
return $lang_select;
}