【发布时间】:2019-02-20 07:02:02
【问题描述】:
在邮递员中调用其余 API 时出现错误。请解决错误。 给定的错误如下所示。
遇到未捕获的异常
类型:错误
消息:在布尔值上调用成员函数 row()
文件名: C:\xampp\htdocs\CodeIgniterRestApi\application\libraries\REST_Controller.php
行号:935
回溯:
文件: C:\xampp\htdocs\CodeIgniterRestApi\application\libraries\REST_Controller.php 行:469 功能:_detect_api_key 文件: C:\xampp\htdocs\CodeIgniterRestApi\index.php 行:315 功能: 需要一次
REST_Controller.php
if ( ! ($row = $this->rest->db->where($this->config->item('rest_key_column'), $key)->get($this->config->item('rest_keys_table'))->row()))
{
$this->_allow = $this->_detect_api_key();
}
【问题讨论】:
-
只需回显您的 last_query() 并查看问题。
-
你想做什么?
-
只是猜测,$row 给出 true 或 false 作为输出,因为 !($row...).. 你需要做其他事情
标签: php rest api codeigniter