这可能是一个错字,但我看不到它......它让我发疯!
我的结构是:
捆绑:/Symfony24/src/NRtworks/ChartOfAccountsBundle
我的表格:/Symfony24/src/NRtworks/ChartOfAccountsBundle/Form/Account_fastedit_form.php
控制器是这样的:
<?php
namespace NRtworks\ChartOfAccountsBundle\Controller;
//form loading
use NRtworks\ChartOfAccountsBundle\Form\Account_fastedit_form;
use NRtworks\SubscriptionBundle\Form\NewCustomer;
class ChartOfAccountsController extends Controller
{
public function indexAction()
{
new NewCustomer();
new Account_fastedit_form();
}
}
?>
我在 Form/Account_fastedit_form.php 中的表单类
<?php
namespace NRtworks\ChartOfAccountsBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class Account_fastedit_form extends AbstractType
{
//whatever
}
?>
然后我得到:
ClassNotFoundException: Attempted to load class "Account_fastedit_form" from namespace "NRtworks\ChartOfAccountsBundle\Form" in /home/eagle1/www/Symfony24/src/NRtworks/ChartOfAccountsBundle/Controller/ChartOfAccountsController.php line 72. Do you need to "use" it from another namespace?
我没有发现我的错误。ps:如您所见,我可以在另一个捆绑包中使用我的表单NewCustomer,没有任何问题,并且结构相似......