1

我面临一些问题calling to a member function create() on a non-object

请帮帮我,我的代码是:-

  <?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();
  ?>
4

1 回答 1

5

像这样尝试......你在$this->帮助者之前失踪了。

<?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');
?>
于 2012-08-20T09:41:53.047 回答