...rg $res_cmd 源码: sdk/php/lib/XSIndex.class.php#L44 (显示) public function execCommand($cmd, $res_arg = XS_CMD_NONE, $res_cmd = XS_CMD_OK){ $res = parent::execCommand($cmd, $res_arg, $res_cmd); foreach (self::$_adds as $srv) { $srv->execCommand($cmd, $res_arg, $...
...义词则返回空数组 源码: sdk/php/lib/XSSearch.class.php#L187 (显示) public function getSynonyms($term){ $term = strval($term); if (strlen($term) === 0) { return false; } $cmd = array('cmd' => XS_CMD_SEARCH_GET_SYNONYMS, 'arg1' => 2, 'buf' => $term); $res = $this-...
...象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L220 (显示) public function del($term, $field = null){ // get field $field = $field === null ? $this->xs->getFieldId() : $this->xs->getField($field); // get commands $cmds = array(); $terms = is_array($term) ? array...
... $previous Exception 源码: sdk/php/lib/XS.class.php#L134 (显示) public function __construct($code, $message, $file, $line, $previous = null){ $this->_file = $file; $this->_line = $line; if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($message,...
...身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L114 (显示) public function setRequireMatchedTerm($value = true){ $arg1 = XS_CMD_SEARCH_MISC_MATCHED_TERM; $arg2 = $value === true ? 1 : 0; $cmd = new XSCommand(XS_CMD_SEARCH_SET_MISC, $arg1, $arg2); $this->execComman...
...须的加 -c gbk 由于我使用的putty设置的是utf8的原因, 虽然显示有点不正常,但加上 -c gbk 就可以了
... protected void connect() 源码: sdk/php/lib/XSServer.class.php#L452 (显示) protected function connect(){ // connect to server $conn = $this->_conn; if (is_int($conn) || is_numeric($conn)) { $host = 'localhost'; $port = intval($conn); } elseif (!strncmp($conn, 'file...
...是编码格式的问题,代码用的是gbk,我没改,看了下网页显示编码也是用的gbk。 然后我用记事本打开XDB 格式的词典文件dict.xdb,效果如下: XDB"/B ? ?? 悯H@ % G ! ? ! p # Z # ! ? # ? ) ? ! ? ! ! ? % ? ! ? ! ;* # P- # -0 ! ...
... XSSearch 搜索操作对象 源码: sdk/php/lib/XS.class.php#L431 (显示) public function getSearch(){ if ($this->_search === null) { $conns = array(); if (!isset($this->_config['server.search'])) { $conns[] = 8384; } else { foreach (explode(';...
...,attr:词性,word:词] 源码: sdk/php/lib/XSTokenizer.class.php#L339 (显示) public function getResult($text){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); $res = self::$_server->execCommand($...