... 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: $error = ' - Unexpected control character foun...
... 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: $error = ' - Unexpected control character foun...
... if (!($this->link = @pg_connect($dsn))) { throw new XSException('Error connecting to PGSQL database:' . $param['dbname'] . '.'); pg_set_error_verbosity($this->link, PGSQL_ERRORS_DEFAULT); pg_query('SET standard_conforming_strings=off'); }} query() 方法 pub...
... $port = -1; } if (($sock = @fsockopen($host, $port, $errno, $error, 5)) === false) { throw new XSException($error . '(C#' . $errno . ', ' . $host . ':' . $port . ')'); } // set socket options $timeout = ini_get('max_execution_time'); $timeout = $timeout > 0 ? ($timeo...
...j = new mysqli($host, $user, $pass, '', $port); if ($this->obj->connect_error) { throw new XSException("Can not connect to mysql server: '$user@$host'"); } if (!$this->obj->select_db($param['dbname'])) { $this->close(); throw new XSException("Can not switch to database ...
...link, $sql); if ($res === false) { throw new XSException('SQLITE ERROR: ' . sqlite_error_string($this->link)); } if (!is_resource($res)) { $ret = $res; } else { $ret = array(); while ($tmp = sqlite_fetch_array($res, SQLITE_ASSOC)) { $ret[] = $tmp; ...
...$this->link); if ($res === false) { throw new XSException('MySQL ERROR(#' . mysql_errno($this->link) . '): ' . mysql_error($this->link)); } if (!is_resource($res)) { $ret = $res; } else { $ret = array(); while ($tmp = mysql_fetch_assoc($res)) { $ret...
...) { if ($this->inCli) { echo "INFO: reach end of file or error occured, total lines: " . $this->line . "\n"; } return false; } $this->line++; if (count($item) === 1 && is_null($item[0])) { if ($this->inCli) { echo "WARNING: invalid csv line ...
...) { if ($this->inCli) { echo "INFO: reach end of file or error occured, total lines: " . $this->line . "\n"; } return false; } $this->line++; if (count($item) === 1 && is_null($item[0])) { if ($this->inCli) { echo "WARNING: invalid csv line ...
...uery($sql); if ($res === false) { throw new XSException('SQLITE3 ERROR(#' . $this->obj->lastErrorCode() . '): ' . $this->obj->lastErrorMsg()); } if (!is_object($res)) { $ret = $res; } else { $ret = array(); while ($tmp = $res->fetchArray(SQLITE3_ASSOC)) { ...