Skip Navigation LinksHome > Categories > Code from a Category

Zend Framework Quick Start

User Name: serfcompany
Name: Serf
Contact Me:
Home Page:
php,mysql,javascript,html,css. Preferable working with Zend Framework. Good know javascript. I worked with various, javascript frameworks such as(jquery, YUI3, extjs, sencha touch). [More]
Viewed Times: 5425
Add Date: 12/11/2011
An article will help you to correctly customize Zend Framework and will show to you tree folders mvc of Zend Framework .
This is tree folder structures which necessary for start your application.

Every folder should be nested is correctly by standart Zend Framework. Here is should be a correct structure of MVC. Folder application should be have configs , controllers, layouts, models, views folders and file Bootstrap.php.
Generally MVC structure can be like that.

The main file index.php which is lying in public folder it will be main file and this file will be include the main path for whole project. Please create file index.php in folder public and write there is code like that.

File aplication/configs/application.ini this is a main config file which has settings for environment and for database. File application.ini has set include path to library APPLICATION_PATH this predefined constant. Which is the way to a root.
includePaths.library = APPLICATION_PATH "/../library" This is a library where lie our folder Zend, you need download it from the oficial site zend framework
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" include file bootstrap this file will be responsible for direction modules.
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" Controllers will be include main php classes for management .
You need properly build the structure like described above. Than you need create file Bootstrap.php it should be located in folder application (application/Bootstrap.php) and put your code there like this.
This code is manager of your direction to modules. Open the file IndexController.php and put this code there
This file is responsible for the management , it is calling a model and view . In this case I call indexActon () and pass a variable to the view with the value greetings "hello world". To display message 'Hello world' you need to create correct view index.phtml file and put it in properly path (view/scripts/index/index.phtml). when your file will be created put there this code.

Hello world

And when you reload your page you will see a greetings Hello world That's all about quick start .

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.