cakePHP Form hataları [kapalı]

2 Cevap php

I m creating just creating a register form in cakephp. When using the following code in my view

<?php echo $form->create('User', array('url' => array('action' => 'register'))); ?>
<?php echo $form->input('User.name', array('type'=>'text')); ?>
<?php echo $form->end(); ?>

Ben bu gibi hataları alırsınız

$model = "Form"</pre><pre>sprintf - [internal], line ??
FormHelper::hidden() - CORE/cake/libs/view/helpers/form.php, line 1021
FormHelper::create() - CORE/cake/libs/view/helpers/form.php, line 214
    include - APP/views/forms/index.ctp, line 5
    View::_render() - CORE/cake/libs/view/view.php, line 662

Bana konuyu anlamanıza yardımcı olur.

2 Cevap

Bu, aynı zamanda çalışır:

echo $form->create('User', array('action' => 'register'));

Bu deneyin:

echo $form->create('User', array('url' => '/users/register'));