Posted by: james | June 8, 2009

How to start Zend framework

For ZENDFRAMEWROK first of all you have to get basic idea of php and you have to be clear with some basic funda of core php so you will get more interset in zend framework.  And if you have no idea about that then, please make some sense with it otherwise you will give up learning of zend framework. and after getting some idea about php get also some idea for MYSQL concepts i mean to say get some idea for INSERT,UPDATE,DELETE and all that queries so you will get more fun in zend framework.

in zend to load class there is two way.

1. use loadClass method od zend_loader class to load any class.


ex: To load Zend_Db class,


This is the bootstrap file or index.php looks like this as under so before start reading zend framework please make some sense with this though u don;t get anything.!!


set_include_path(‘.’ . PATH_SEPARATOR . ‘./library’ . PATH_SEPARATOR . ‘./application/models/’ . PATH_SEPARATOR . get_include_path());
require_once ‘Zend/Controller/Front.php’;
require_once ‘Zend/Layout.php’;


$config = new Zend_Config_Ini(‘./application/config.ini’,’general’);
$registry = Zend_Registry::getInstance();

$db = Zend_Db::factory($config->db->adapter,$config->db->config->toArray());

// Setup controller
$controller = Zend_Controller_Front::getInstance();
$controller->throwExceptions(false); // should be turned on in development time

// bootstrap layouts

Zend_Layout::startMvc(array(‘layoutPath’ => ‘./application/layouts’, ‘layout’ => ‘main’));

// run!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: