开发者

Undefined $input in kohana

开发者 https://www.devze.com 2023-04-13 07:58 出处:网络
So..I\'ve created a controller inside a directory. application - classes - controller - api user.php and added the following route in my bootstrap

So..I've created a controller inside a directory.

application
  - classes
      - controller
          - api
              user.php

and added the following route in my bootstrap

Route::set('with_dir','api/(<controller>(/<action>(/<id>)))')->defaults(array(
    'directory'=>'api',
    'controller'=>'index'
));

I can access my user controller by /api/user, but the problem is that I get the following error.

Undefined property: Controller_Api_User::$input

i开发者_StackOverflow社区n my user controller, I have

$fbid = $this->input->post('fbid');

Why is it happening?


My best bet? You followed a 2.x tut while you use 3.x. Try $this->request->post('fbid');

You can find the api docs here: http://kohanaframework.org/3.2/guide/api

0

精彩评论

暂无评论...
验证码 换一张
取 消