getRelatedQuery() 方法 public array getRelatedQuery(string $query=NULL, int $limit=6) $query string 搜索语句, 若传入 null 使用默认语句 $limit int 需要返回的相关搜索数量上限, 默认为 6, 最大值为 20 {return} array 返回搜索词组成...
connect() 方法 public void connect(array $param) $param array 连接参数, 包含: path 源码: sdk/php/util/XSDataSource.class.php#L756 (显示) public function connect($param){ try { $this->obj = new SQLite3($param['path'], SQLITE3_OPEN_READONLY); } catch (Excep...
makeDsn() 方法 protected string makeDsn(array $param) $param array 包含 path 为数据库路径 {return} string 源码: sdk/php/util/XSDataSource.class.php#L945 (显示) protected function makeDsn($param){ $dsn = 'sqlite:' . $param['path']; return $dsn;} ...
...文分词解析 function SCWS($title) { set_time_limit(0); $data = array("data"=>$title,"respond"=>"json","ignore"=>'yes', "multi"=>3); $data = http_build_query($data); $re = web_socket("http://www.ftphp.com/scws/api.php",0,$data); if(!$re) { return array('words'=>array()); } re...
... null;} 关闭数据库 connect() 方法 public void connect(array $param) $param array 连接参数, 包含: user, pass ... 源码: sdk/php/util/XSDataSource.class.php#L818 (显示) public function connect($param){ $dsn = $this->makeDsn($param); $user = isset($param...
...c function addIndex($field, $text){ $field = strval($field); if (!is_array($this->_texts)) { $this->_texts = array(); } if (!isset($this->_texts[$field])) { $this->_texts[$field] = strval($text); } else { $this->_texts[$field] .= "\n" . strval($text); }} ...
...self::BROKEN | self::FILE)) { return false; } $wfds = $xfds = array(); $rfds = array($this->_sock); $res = stream_select($rfds, $wfds, $xfds, 0, 0); return $res > 0;} 判断服务端是否有可读数据 用于某些特别情况在 getRespond 前先调用和判断, 以免...
connect() 方法 public void connect(array $param) $param array 连接参数, 包含: user, pass ... 源码: sdk/php/util/XSDataSource.class.php#L818 (显示) public function connect($param){ $dsn = $this->makeDsn($param); $user = isset($param['user']) ? $param['user'] : 'r...
...$this->getDataList(); } $item = json_decode($line, true); if (!is_array($item) || count($item) === 0) { switch (json_last_error()) { case JSON_ERROR_DEPTH: $error = ' - Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR...
...ulti(11)->getResult("是一"); print_r($tk); [/php] 结果是 [quote] Array ( [0] => Array ( [off] => 0 [attr] => m [word] => 是一 ) ) [/quote] 我希望的结果是把两个字分成两个单字:‘是’,‘一’。 ...