2011-09-20 242 views
0

我學習Kohana 3.2和分頁。但我收到錯誤ErrorException [ Notice ]: Undefined property: Request::$uri爲什麼我得到這個錯誤?

問題在哪裏?

分頁類(模塊)

switch ($this->config['current_page']['source']) 
     { 
      case 'query_string': 
       return URL::site(Request::current()->uri).URL::query(array($this->config['current_page']['key'] => $page)); 

      case 'route': 
       return URL::site(Request::current()->uri(array($this->config['current_page']['key'] => $page))).URL::query(); 
     } 

回答

2

使用Request::current()->uri()而不是Request::current()->uri

+0

謝謝你,洛朗! :) – reGative

相關問題