![]() |
|
|||
|
Hi there,
I'm trying to follow the tutorial in Akra’s DevNotes Tutorial: Getting Started with Zend Framework 1.8 but with little sucess! When I get to part that I need to add the code: public function indexAction() { $this->view->title = "My Albums"; $this->view->headTitle($this->view->title, 'PREPEND'); $albums = new Model_DbTable_Albums(); $this->view->albums = $albums->fetchAll(); } In the IndexController I always get this error: I think the warnings are related to the //in the path /home/cardcc/public_html/zendframework/zend3/application/models/DbTable//Albums.php after the warnings obviously comes the Fatal error due to the fact that i couldn't load the model. So how do i solve this? Please help this newbie! |
|
|||
|
Yout model file should be named exactly as its class name, i.e.: class Albums => Albums.php. You should also set models directory in your include path...
|
|
|||
|
Quote:
I'm just following the tutorial, why should I change any name?? The only thing i had to change would be the database details... How can I set the models directory and in which file? I could show my files but they are exactly like the ones in the tutorial... |
|
|||
|
There shouldn't be any need to rename the class/file as suggested - the resource autoloader should find it, your configuration looks good as far as I can see (I haven't read that tutorial).
Does the file /home/cardcc/public_html/zendframework/zend3/application/models/DbTable/Albums.php exist? I just checked a working app I have and it also causes the double slash // in the resource autoloader but it doesn't prevent anything from loading (on a linux box). So it does seem like a bug, but doesn't seem to matter. (You could check this on your platform by adding a // to any include/require you know works otherwise).
__________________
Brenton Alker PHP Developer - Brisbane, Australia blog.tekerson.com | twitter.com/tekerson | brenton.mp |
|
|||
|
Hi,
I am following the same tutorial as you. and i am facing problem in setting up actions in IndexController.php. Please read my post at CLI php.exe not found and give me any solution. Regards, Umair |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Designed by: Miner Skinz |
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.1.0 |
![]() |