Download DB2 Express-C: The Developer Handbook for XML

Transcript
Getting Started
When a user loads the URL http://localhost/, the user sees the page shown
in Figure 3-5.
Figure 3-5 MyContacts.com Index page
Controllers
MyContacts.com has the following controllers:
򐂰 IndexController
Our IndexController is as clean as it should be. It has a indexAction() method
to serve the main Web page (Home page) and a noRouteAction() method to
reroute users to the home page in case users become creative and modify
the links. Example 3-25 shows the IndexController.php.
Example 3-25 MyContacts.com: IndexController.php
<?php
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
Chapter 3. Application development with PHP
127