Archive | Zend Framework
Zend Framework vhost settings
Zend Framework vhost settings for xampp server or lampp server
Add the below code in httpd-vhosts.conf in \xampp\apache\conf\extra and modify the paths
<VirtualHost *:8081> php_value include_path ".;C:\xampp\htdocs\public;C:\xampp\htdocs\PhpProject2\library" DocumentRoot "C:\xampp\htdocs\PhpProject2\public" <Directory "C:\xampp\htdocs\PhpProject2"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
and then add Listen 8081 in httpd.conf file located at xampp\apache\conf
and restart your xampp server ..
Zend Framework Router example
Zend Framework Router implementation in bootstrap
protected function _initRouter(){
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
$default_route = new Zend_Controller_Router_Route_Static(
'home',
array('controller' => 'index', 'action' => 'index')
);
$router->addRoute('home', $default_route);
}
Add stylesheets to the layout from the bootstrap
You need to append stylesheets to the headlink
First you need to add the below code in you bootstrap.php
<?php
protected function _initStylesheet() {
$view = new Zend_View ( $this->getOptions () );
// retreives the css file names in and object array
$view->headLink ()->appendStylesheet ('csspath1');
$view->headLink ()->appendStylesheet ('csspath2');
return $view;
}
?>
And then add the below code before the </head> tag in your layout
<?php echo $this->headLink(); ?>
Yep.... I couldn't have said it better myself......
Yep.... I couldn't have said it better myself......
Yahoo results... While searching Yahoo I found this page in the results and I didn't think
Nice Focus.... I really like the direction you've decided to take this blog....