...b/XS.class.php#L79 (显示) public static function getRelPath($file){ $from = getcwd(); $file = realpath($file); if (is_dir($file)) { $pos = false; $to = $file; } else { $pos = strrpos($file, '/'); $to = substr($file, 0, $pos); } for ($rel = '';; $rel ....
... 方法 public static mixed convert(mixed $data, string $to, string $from) $data mixed 需要转换的数据, 支持 string 和 array, 数组会自动递归转换 $to string 转换后的字符集 $from string 转换前的字符集 {return} mixed 转换后的数...
... $this->inCli) { echo "WARNING: input file not specified, read data from
...ot specified any query SQL or db table'); } $sql = 'SELECT * FROM ' . $param['table']; } elseif (preg_match('/ limit\s+(\d+)(?:\s*,\s*(\d+)|\s+offset\s+(\d+))?\s*$/i', $sql, $match)) { if (isset($match[3])) { // LIMIT xxx OFFSET yyy $this->offset = intval($match[3...
... addRange() 方法 public XSSearch addRange(string $field, mixed $from, mixed $to) $field string $from mixed 起始值(不包含), 若设为 null 则相当于匹配 <= to (字典顺序) $to mixed 结束值(包含), 若设为 null 则相当于匹配 >= from (字典...
... if ($this->_charset !== null && $this->_charset !== 'UTF-8') { $from = $this->_meta === null ? $this->_charset : 'UTF-8'; $to = $this->_meta === null ? 'UTF-8' : $this->_charset; return new ArrayIterator(XS::convert($this->_data, $to, $from)); } return new ArrayIterato...
... $this->inCli) { echo "WARNING: input file not specified, read data from
...ver.class.php#L334 (显示) public function getRespond(){ // read data from server $buf = $this->read(8); $hdr = unpack('Ccmd/Carg1/Carg2/Cblen1/Iblen', $buf); $res = new XSCommand($hdr); $res->buf = $this->read($hdr['blen']); $res->buf1 = $this->read($hdr['blen1']); return $re...
...s($data)) === false) { throw new XSException('Failed to read exdata from file'); } // try to check allowed (BUG: check the first cmd only): // XS_CMD_IMPORT_HEADER, XS_CMD_INDEX_REQUEST, XS_CMD_INDEX_REMOVE, XS_CMD_INDEX_EXDATA $first = ord(substr($data, 0, 1)); if ($first != X...