Discussion
A typical URI for the web starts off by defining the scheme, commonly http://. Then follows the domain name, which is essential for locating the computer that hosts the website. So a basic URI might be http://example.com.
This does not explicitly define any document, only a particular website. The web server, typically Apache, is usually configured so that it has defaults for the document that will be served when only a directory is specified. So when we submit nothing more than the domain name, the web server will implicitly add the name of a default document. For the kind of PHP systems that interest us, that will often be index.php
.
We are free to go much further and specify a document by giving directories and file names. For things such as images, this is exactly what happens nearly all the time. An example of a URI that might find an image is http://images.packtpub.com/images/full/1847193579.jpg, which points to a directory /images/full
within a website, and then selects...