我正在尝试将非表单相关按钮放入视图中以注册按钮,以引导人们进行控制器操作,但我仍然会收到error500内部错误。我在这里做错了什么想法?
<?php
echo $this->Form->create('User');
echo $this->Session->flash();
echo $this->Form->input('username', array('label' => false, 'div' => false, 'class' => 'w-icon validate[required]'));
echo $this->Form->input('password', array('label' => false, 'div' => false, 'class' => 'w-icon validate[required]'));
echo $form->button('Register', array('type' => 'button', 'class' => 'button red tiny'));
echo $this->Form->submit('Login', array('class' => 'button blue tiny'));
echo $this->Form->end();
?>
答案 0 :(得分:2)
$form->button
是CakePHP 1.2语法,$this->Form
是1.3以上。