Prev | Current Page 34 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

In this case we use a directory called library, though it is common to see this directory called lib,
include or inc.
2.2.3 The tests directory
The tests directory is used to store all unit tests that are written. Unit tests are used to help ensures that the code
continues to work as it grows and changes throughout the lifetime of the application. As the application is
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
developed, code that was written previously often needs to be changed (known as refactored) ready for the
addition of new functionality or as a result of other code added to the application. Whilst, within the PHP
world, test code is rarely considered important, you will thank yourself over and over again if you have unit
tests for your code.
2.2.4 The web_root directory
To improve the security of a web application, the web server should only have direct access to the files that it
needs to serve. As the Zend Framework uses the front controller pattern, all web requests are channeled though
a single file, usually called index.php. This file is the only PHP file that needs to be accessible by the web
server and so is stored in the web_root/ directory.


Pages:
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
mameh.sporgit.pl loans online instant approval baseny ogrodowe aragorn.binto.pl Kocham wakacje