|  | 
 
| php5.4及以上版本會(huì)有此問(wèn)題 解決辦法:
 1. 找到 uc_client/lib/uccode.class.php 文件
 2.將 $message = htmlspecialchars($message); 替換為 $message = dhtmlspecialchars($message);
 
 關(guān)于dhtmlspecialchars 是 discuz自定義的將字符轉(zhuǎn)化為Html實(shí)體的函數(shù),對(duì)php版本做了兼容
 
 復(fù)制代碼 function dhtmlspecialchars($string, $flags = null) {
      if(is_array($string)) {
          foreach($string as $key => $val) {
              $string[$key] = dhtmlspecialchars($val, $flags);
          }
      } else {
          if($flags === null) {
              $string = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string);
              if(strpos($string, '&#') !== false) {
                 //過(guò)濾掉類似志的16進(jìn)制的html字符
                 $string = preg_replace('/&((#(\d{3,5}|x[a-fA-F0-9]{4}));)/', '&\\1', $string);
             }
         } else {
             if(PHP_VERSION < '5.4.0') {
                 $string = htmlspecialchars($string, $flags);
             } else {
                 if(strtolower(CHARSET) == 'utf-8') {
                     $charset = 'UTF-8';
                 } else {
                     $charset = 'ISO-8859-1';
                 }
                 $string = htmlspecialchars($string, $flags, $charset);
             }
         }
     }
     return $string;
 }
 
 | 
 |