-1
我是Zend Framework 2的新手。我在创建表单时收到致命错误消息。zend框架中的表单错误2
这是我的表单类:
namespace Myform\Form;
use Zend\Form\Form;
class CustomerloginForm extends Form
{
public function __construct($name)
{
parent::__construct($name);
$this->add(array(
'name' => 'submit',
'type' => 'Submit',
'attributes' => array(
'value' => 'BusEnquiry',
'id' => 'btn-fblogin',
'class'=>'btn btn-primary',
'style'=>'float:left;position:relative;left:5px;'
),
));
}
}
这是我的控制器类:
namespace Myform\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\View\Renderer\PhpRenderer;
use Myform\Form\CustomerloginForm;
class LoginController extends AbstractActionController
{
public function loginAction()
{
$form = new CustomerloginForm('customerloginForm');
//this is the problem area
//I am getting a fatal error message that CustomerloginForm class can not be found
return new viewModel();
}
}
Fatal error: Class 'Myform\Form\CustomerloginForm' not found
日Thnx答复我解决的问题üR右我的文件夹名称是错误的日Thnx爱你的计算器和所有成员 –
@PRASHANTMAROTHIYA如果我的回答解决您的问题,这将是巨大的,如果你能接受它。然后其他人也知道这个问题是回答。 – Wilt