$arr = $db_t->connect($address, $user, $pwd); $rc = $arr['errno']; if ($arr['errno'] == 0) { $link_result = "连接成功"; } else { $rc = $arr['errno']; $link_result = "连接失败:" . (array_key_exists($rc, $errno_cn) ? $errno_cn[$rc] : $rc); } $return_arr = array('errno' => $rc, 'message' => $link_result); } else { if ($model == "connect") { $_SESSION['sdb_monitor_address'] = $address; $_SESSION['sdb_monitor_user'] = $user; $_SESSION['sdb_monitor_password'] = $pwd; $db_t = new SequoiaDB(); $arr = $db_t->connect($address, $user, $pwd); $rc = $arr['errno']; $return_arr = array('errno' => $rc, 'message' => array_key_exists($rc, $errno_cn) ? $errno_cn[$rc] : $rc); } } } } } $array_temp = array(); $error_record = 0; if (file_exists($path)) { $file = fopen($path, "r+"); while (!feof($file)) { $str = fgets($file, 163840); if ($str[0] != ",") { array_push($array_temp, $str);