Project description : A simple guestbook module using Zend Framework 1.11 .
Project
Create new project using Zend_Tool :
zf create project MyApp
cd MyApp
Create module :
zf create module Guestbook
Create controller for Guestbook (1 = index action included):
zf create controller Index 1 Guestbook
Now go to /MyApp/application/configs/application.ini and comment/delete the line :
;resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
Then add the lines
;Modular suport
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =
And add this lines to set Guestbook as default module
resources.frontController.params.prefixDefaultModule = "1"
resources.frontController.defaultModule = "Guestbook"
Create php file “Bootstrap.php” under folder /MyApp/application/modules/Guestbook and past the code
<?php
class Guestbook_Bootstrap extends Zend_Application_Module_Bootstrap{}
Now test your app
Read the rest of this entry »
April 25th, 2011 in
Development | tags:
1.11,
Framework,
php,
Zend,
Zend Controller,
Zend Db-Table,
Zend Framework,
Zend Module,
Zend_Tool,
ZF |
13 Comments