/**
* 简单解析 BBCODE,只解析文字相关
*
* @param $message 内容
*
* @returns
*/
public static function bbcode($message) {
$message = str_replace(array(
'[br]'
), array(
'<br>'
), preg_replace(array(
"/\[u\](.+?)\[\/u\]/i",
"/\[i\](.+?)\[\/i\]/i",
"/\[b\](.+?)\[\/b\]/i",
"/\[color=([#\w]+?)\](.+?)\[\/color\]/i",
), array(
"<u>\\1</u>",
"<i>\\1</i>",
"<strong>\\1</strong>",
"<font color=\"\\1\">\\2</font>",
), $message));
return $message;
}