1 頁 (共 1 頁)

[問題] 不能連結圖像

發表於 : 2004-11-18 11:51
woow
上傳沒有問題, 但連結頭像出現\r

Could not write avatar file to local storage. Please contact the board administrator with this message

DEBUG MODE

Line : 157
File : /kappawwwroot/woowdog.com/www/forum/includes/usercp_avatar.php

現貼出第157行(紅色那句)及附近的行數\r

代碼: 選擇全部

function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)

{

	global $board_config;

	if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_filename)) && ($mode == 'editprofile') )

	{

		$return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY;

	}

	else

	{

		$return = '';

	}

	return $return;

}



[color=red]function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)[/color]

{

	if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )

	{

		$avatar_filename = 'http://' . $avatar_filename;

	}



	if ( !preg_match("#^((ht|f)tp://)([^ \?&=\#\"

\t<]*?(\.(jpg|jpeg|gif|png))$)#is", $avatar_filename) )

	{

		$error = true;

		$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];

		return;

	}



	return ( $mode == 'editprofile' ) ? ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_REMOTE : '';



}

發表於 : 2004-11-19 12:36
woow
我仲未解決到啊 ~ 有學長知道嗎 ? thanks ~