Friday, April 23, 2010

Zend Framework Tutorials

1.first set the bootstrap

 protected function _initAppAutoload()
        $moduleLoad = new Zend_Application_Module_Autoloader(array(
           'namespace' => '',
           'basePath'   => APPLICATION_PATH

2.set up the database connection in another class file or config.ini
  first write code in ini file
 db.adapter = PDO_MYSQL = localhost
 db.config.user = root
 db.config.password = password
 db.config.dbname = zend

  then in public index.php write code
$config =new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini','general');
$db = Zend_Db::factory($config->db->adapter,$config->db->config->toArray());

3.create the class in model and give the name of the table

No comments:

Post a Comment