問題現象:
註冊的時候,輸入正確的郵箱,或者密碼確認的時候 ,提示輸入不正確

問題原因:
由於註冊表單中 name 是隨機產生的,當產生 name 為純數字的時候會產生問題。

解決方案:
打開 function_core.php,找到 random 函數

  1. function random($length, $numeric = 0) {
  2.        $seed = base_convert(md5(microtime().$_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
  3.        $seed = $numeric ? (str_replace('0', '', $seed).'012340567890') : ($seed.'zZ'.strtoupper($seed));
  4.        $hash = '';
  5.        $max = strlen($seed) - 1;
  6.        for($i = 0; $i < $length; $i++) {
  7.               $hash .= $seed{mt_rand(0, $max)};
  8.        }
  9.        return $hash;
  10. }

更改為:

  1. function random($length, $numeric = 0) {
  2.         $seed = base_convert(md5(microtime().$_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
  3.         $seed = $numeric ? (str_replace('0', '', $seed).'012340567890') : ($seed.'zZ'.strtoupper($seed));
  4.         if($numeric) {
  5.                 $hash = '';
  6.         } else {
  7.                 $hash = chr(rand(1, 26) + rand(0, 1) * 32 + 64);
  8.                 $length--;
  9.         }
  10.         $max = strlen($seed) - 1;
  11.         for($i = 0; $i < $length; $i++) {
  12.                 $hash .= $seed{mt_rand(0, $max)};
  13.         }
  14.         return $hash;
  15. }