【问题标题】:Slim showing Application error when trying to call function尝试调用函数时 Slim 显示应用程序错误
【发布时间】:2019-12-23 20:26:57
【问题描述】:

当我尝试在 slim 中调用函数时,它显示应用程序错误,我无法找出实际错误

if(is_a_valid_route_user_action($this->from_user['action_id']))

     {
        return get_action_id_from_route_user_action($this->from_user['action_id']);

        }

get_action_id_from_route_user_action 是要调用的函数

if(!function_exists('get_action_id_from_route_user_action'))
{
    function get_action_id_from_route_user_action($organization_id,$route_user_action_id)
    {

        $db = org_db_connection($organization_id);

        $get_previous_level_sql = "SELECT action_id from route_user_actions where id=".$route_user_action_id;

        $get_previous_level_object = mysqli_query($db, $get_previous_level_sql);

        if ($get_previous_level_object->num_rows > 0)
        {
            while($get_previous_level= mysqli_fetch_assoc($get_previous_level_object))
            {
                $action_id = (int)$get_previous_level['action_id'];
                return $action_id;
            }
        }
        else
        {
            return false;
        }
    }
}

【问题讨论】:

  • slim 会在某处写入日志文件吗?如果没有,您可以启用 slim 写入日志文件吗? Web 服务器的日志文件中有条目吗?
  • 检查你的 php error_log

标签: php api slim


【解决方案1】:

我启用了错误报告,它起作用了

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    • 2020-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多