php code with a try/catch block yourself.
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
To actually run the application we call the front controller??™s dispatch() method. This function will
automatically create a request and response object for us to encapsulate the input and output of the application.
It will then create a router to work out which controller and action the user has asked for. A dispatcher object
is then created to load the correct controller class and call the action member function that does the ???real???
work.
Finally, as we??™ve noted above, the front controller outputs the data within the response object and so a web
page is displayed to the user.
2.5.2 Apache .htaccess
To ensure that all web requests that are not for images, scripts or style sheets are directed to the bootstrap
file, Apache??™s mod_rewrite module is used. This can be configured directly in Apache??™s httpd.conf file or in a
local Apache configuration file named .htaccess that is placed in the web_root/ directory. Listing 2.2 shows the
.htaccess file required for the Zend Framework:
Listing 2.2: web_root/.htaccess
# Rewrite rules for Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f #1
RewriteRule .
Pages:
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51