|
|||
|
Hi
I'm setting up and testing Zend Framework but I just can't find out why I can't get this file (class) loaded. Zend_Loader::loadClass('forms_ContactForm'); Then I get this error: exception 'Zend_Exception' with message 'File "forms/ContactForm.php" does not exist or class "forms_ContactForm" was not found in the file' in /home/devtech/public_html/zspot/library/Zend/Loader.php:88 (and the stack...) The actual file is located at: /application/default/forms/ContactForm.php name of the class is forms_ContactForm. Is this enough information to maybe solve this problem? Thanks, Jasper |
|
||||
|
The problem is that your forms directory isn't in your include path. Two possible solutions would be to:
1. Add the forms directory to the include in the contollers init() function. The bad is that you have to do this for every controller, resulting in lots of repeated code. 2. Make a plugin to add the forms directory. This is probably the better solution. You can find an example with model loading here. Some minor alterations will get you up and going.
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth |
![]() |
| Thread Tools | |
| Display Modes | |
|
|