2011-08-26 42 views
-1

我從Kohana 2升級項目的Kohana 3的意見Kohana的使用對象3.0

在Kohana的2.0版本,在視圖文件,它寫的是:

if ($this->uri->segment('page')) 
{ 
    if ($this->uri->segment(5)) 
    { 

在Kohana中3,我改變了這個

if ($this->request->param('page')) 
{ 
    if ($this->request->param('param5')) 
    { 

但它給出了以下錯誤信息。

ErrorException [致命錯誤]:使用$這個時候不是在對象上下文

我應該如何解決這個問題?

回答