html directory of the above file system layout.
html/.htaccess file above to read as
follows:
html/index.php in this case. Open up
html/index.php in the editor of your choice and add
the following:
http://framework.zend.com/roadmap/components, the
path is /roadmap/components, which will map to the
controller roadmap and the action
components. If no action is provided, the action
index is assumed, and if no controller is provided,
the controller index is assumed (following the
Apache convention that maps a DirectoryIndex
automatically).
Controller. Thus, in our example above, the
controller roadmap is mapped to the class
RoadmapController.
Action is appended. Thus, in our example
above, the action components becomes
componentsAction, and the final method called is
RoadmapController::componentsAction().
index. Open the file
application/controllers/IndexController.php, and
enter the following:
ViewRenderer does some magic, and uses the
controller name (e.g., index) and the current
action name (e.g., index) to determine what
template to pull. By default, templates end in the
.phtml extension, so this means that, in the above
example, the template index/index.phtml will be
rendered. Additionally, the ViewRenderer
automatically assumes that the directory views at
the same level as the controller directory will be the base view
directory, and that the actual view scripts will be in the
views/scripts/ subdirectory. Thus, the template
rendered will be found in
application/views/scripts/index/index.phtml.
application/views/scripts/; the view script for the
default controller and action is in
application/views/scripts/index/index.phtml. Create
this file, and type in some HTML:
ErrorController in the default module
with an errorAction method:
application/controllers/ErrorController.php.
You will also need to create a view script in
application/views/scripts/error/error.phtml; sample
content might look like:
An error occurred; please try again later.
]]>example.com is your domain, any of the following
URLs will get to the page we've just created:
http://example.com/http://example.com/indexhttp://example.com/index/index