调用非对象上的成员函数create() [英] calling to a member function create() on a non-object
本文介绍了调用非对象上的成员函数create()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了 调用非对象上的成员函数create()的一些问题
I am facing some problem of calling to a member function create() on a non-object
请帮助我,我的代码是: -
please help me out,My code is :-
<?php
echo $form->create('Register', array('action' => 'register'));
echo $form->input('username');
echo $form->input('password');
echo $form->input('cnfrmpassword', array('type' => 'password'));
echo $form->submit();
echo $form->end();
?>
推荐答案
$ this->
Try like this.... You're missing $this->
before the helper.
<?php
echo $this->Form->create('User', array('action' => 'register'));
echo $this->Form->input('username');
echo $this->Form->input('password');
echo $this->Form->input('cnfrmpassword', array('type' => 'password'));
echo $this->Form->end('Submit');
?>
这篇关于调用非对象上的成员函数create()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文