JavaEar 专注于收集分享传播有价值的技术资料

An internal error occured in cakephp

I have a controller name ReminderController from which I wanna call admin_index.ctp.

class ReminderController  extends AppController {
    public function admin_index(){
        $this->paginate=array('limit' =>'10');

        $this->set('news', $this->paginate('Reminder'));    

    }

When I call view name admin_index from a controller I found an internal error has been occurred... please help me out from this problem.........

1个回答

    最佳答案
  1. I'm not familiar with cakephp, but according to me error is in below 2 lines:

    $this->paginate=array('limit' =>'10');
    
    $this->set('news', $this->paginate('Reminder'));   
    

    Because, in the first line you are assigning an array to $this->paginate. But in the second line you are calling it as a function.