Model class is not found in zend framework project (quickstart) ,please help
Posted
by Dumindu
on Stack Overflow
See other posts from Stack Overflow
or by Dumindu
Published on 2010-03-19T08:35:02Z
Indexed on
2010/03/19
8:41 UTC
Read the original article
Hit count: 208
zend-framework
The things I did is
- zf create project demo1 in command prompt
- add the lines to application.ini
- appnamespace = "Application"
- resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
- add a layout with header and footer using partial() (They are perfectly worked)
create Data.php in models directory and add this simple class
<?php class Application_Model_Data{ }//Application for appnamespace
then I tried to load this class(by creating instance)from index controller index action
$data = new Application_Model_Data();
but when I test it even in this level it gives an error
Fatal error: Class 'Application_Model_Data' not found in C:\Zend\...\IndexController.php
Question
- Do I want to add a autoloader to load models in the application( I'm not used modules)
- if not what was I missed to add
please help I'm stuck in the beginning,Thank you
© Stack Overflow or respective owner