0
我是一個CakePHP的2.3工作..這裏是我的代碼CakePHP的致命錯誤:調用一個成員函數的格式()非對象
class MessagesController extends AppController{
public $helpers = array('Time');
public function messages(){
$datetime= $this->Message->getDatetime($userid); //$datetime = 2013-06-14 10:28:00
$time = $this->Userinfo->getTimeZone($userid); //$time = 5.00
$finaltime = $this->Time->format('Y-m-d H:i:s', $dateTime, NULL, $time);
出口();
}
它給我
Fatal error: Call to a member function format() on a non-object
任何人知道我在做什麼錯?
不能正常工作......給錯誤 – hellosheikh
這是否給出相同的錯誤之前? – Sixthpoint
此問題已被解決,但爲cakephp的不同版本:http://stackoverflow.com/questions/1779176/cakephp-time-helper-problem – Sixthpoint