方法不存在

浏览:1816 发布日期:2018/10/30 分类:ThinkPHP5专区
报错:方法不存在:app\admin\controller\Category->edit.html()
            $actionName = $suffix ? substr($methodName, 0, -strlen($suffix)) : $methodName;
            $request->action($actionName);

        } elseif (is_callable([$instance, '_empty'])) {
            // 空操作
            $call = [$instance, '_empty'];
            $vars = [$actionName];
        } else {
            // 操作不存在
            throw new HttpException(404, 'method not exists:' . get_class($instance) . '->' . $action . '()');
        }

        Hook::listen('action_begin', $call);

        return self::invokeMethod($call, $vars);
    }

    /**
     * URL路由检测(根据PATH_INFO)
但是我在控制器里定义的方法是:namespace app\admin\controller;
use think\Controller;

class Category extends Controller
{
    public function edit()
    {
        echo input('get.id');
        return $this->fetch();
    }
}
报错哪里为什么会多一个.html的后缀名
求解答~感谢
最佳答案
评论() 相关
后面还有条评论,点击查看>>