开发者

Zend Framework Form load error

I just moved my ZF application from one server to another, and everything is loading smoothly, except for forms. It just throws this error:

Fatal error: Class 'Admin_Form_Cms_AddForm' not found in /xx/application/modules/admin/controllers/CmsController.php on line 42

The modules, models, controllers are loaded as they should be, but no forms. What co开发者_StackOverflow中文版uld have gone wrong, and how do I fix this?


Are you moving from a Win Server to a *nix server? Remember the filenames are case sensitive, so that could be the problem.


You need to add in boostrap:

public function _initModules()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
        'namespace' => 'Yourmodule_',
        'basePath'  => dirname(__FILE__) . '/modules/yourmodule',
    ));
}

That solve your(and my) problem =);


Is it possible your application.ini file is diferenton the server? Maybe the evironment variable being on production it changes something for you? And are you sure everything is the same?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜