-2
當我爲用戶創建表單時。它顯示以下錯誤致命錯誤:找不到類'Symfony Component Form'
Fatal error: Class 'Symfony\Component\Form' not found in D:\wamp\www\sandbox\src\Sensio\HelloBundle\User\UserForm.php on line 7"
下面是UserForm.php的代碼
<?php
use Symfony\Component\Form;
use Symfony\Component\Form\TextField;
use Symfony\Component\Form\EmailField;
class UserForm extends Form
{
protected function configure()
{
$this->add(
new TextField('name',
array('max_length' => 100,
'required' => true
)
)
);
$this->add(
new EmailField('email',
array('max_length' => 100,
'required' => true
)
)
);
}
}
好吧,檢查Form.php是否存在。 – 2011-03-03 09:46:42