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