...y($line)) { if ($this->inCli) { echo "INFO: reach end of the file, total lines: " . $this->line . "\n"; } return false; } // try to decode the line $this->line++; $line = rtrim($line, "\r\n"); if (strlen($line) === 0) { if ($this->inCli) { ...
...ceof XSCommand) { $cmd = new XSCommand($cmd); } // just cache the cmd for those need not answer if ($cmd->cmd & 0x80) { $this->_sendBuffer .= $cmd; return true; } // send cmd to server $buf = $this->_sendBuffer . $cmd; $this->_sendBuffer = ''; $this->writ...
...y($line)) { if ($this->inCli) { echo "INFO: reach end of the file, total lines: " . $this->line . "\n"; } return false; } // try to decode the line $this->line++; $line = rtrim($line, "\r\n"); if (strlen($line) === 0) { if ($this->inCli) { ...
...imeout' : ($meta['eof'] ? 'closed' : 'unknown'); $msg = 'Failed to recv the data from server completely '; $msg .= '(SIZE:' . ($size - $len) . '/' . $size . ', REASON:' . $reason . ')'; throw new XSException($msg);} 读取数据
...directly if (empty($value)) { return $value; } // initlize the highlight replacements if (!is_array($this->_highlight)) { $this->initHighlight(); } // process replace if (isset($this->_highlight['pattern'])) { $value = preg_replace($this->_highlight['pattern...
...ut' : ($meta['eof'] ? 'closed' : 'unknown'); $msg = 'Failed to send the data to server completely '; $msg .= '(SIZE:' . ($size - $len) . '/' . $size . ', REASON:' . $reason . ')'; throw new XSException($msg); }} 写入数据
...T', $data); } else { throw new XSException('Cann\'t find the mbstring or iconv extension to convert encoding'); } } return $data;} 字符集转换 要求安装有 mbstring, iconv 中的一种
... || strpos($query, ':') !== false) { return $ret; } // Search the log database $op = $this->_defaultOp; $this->xs->setScheme(XSFieldScheme::logger()); try { $result = $this->setDb(self::LOG_DB)->setFuzzy()->setLimit($limit + 1)->search($query); foreach ($result as...
...$this->_vnoMap[$field->vno] = $field->name; // save field, ensure ID is the first field if ($field->type == XSFieldMeta::TYPE_ID) { $this->_fields = array_merge(array($field->name => $field), $this->_fields); } else { $this->_fields[$field->name] = $field; }} 添加字...
...== XS_CMD_OK && $res->arg == XS_CMD_OK_RESULT_END) { // got the end // echo "Parsed Query: " . $res->buf . "\n"; break; } else { $msg = 'Unexpected respond in search {CMD:' . $res->cmd . ', ARG:' . $res->arg . '}'; ...