HTML and CSS Reference
In-Depth Information
Files with an extension of .cgi, .php, .jsp, and .asp generate dynamic web
pages. hese are typically placed in the list ahead of the static HTML iles that
have extensions of .shtml, .html, and .htm. If no default index ile from the list
of names is found in the directory, a web server may be conigured to generate
an index listing of the iles in that directory. his applies to every subdirectory
in the website's document root. However, many of the coniguration options
for a website can be set or overridden on a per-directory basis.
At the most structurally simple level, a website can consist of a single ile.
All the website's CSS rules and JavaScript code would be placed in style and
script elements in this ile or referenced from other sites. Likewise, any images
or media objects could be referenced from external sites. A website with only
one web page can still be quite complex functionally. It can draw content from
other web servers using AJAX techniques, can hide or show document ele-
ments in response to user actions, and can interact graphically with the user
using the HTML5 canvas elements and controls. If the website's index ile is an
executable ile, such as a CGI script or PHP ile, the web server runs a program
that dynamically generates a page tailored to the user's needs and actions.
Most websites have more than one ile. A typical ile structure for a website
may look something like Example 5.1.
example 5.1: the file structure of a typical website
|_ cgi-bin /* For server-side cgi scripts */
| |_formmail.cgi
|_ logs /* Web access logs */
| |_access_log
| |_error_log
|_ public_html /* The Document Root directory */
|_about.html /* HTML files for web pages */
|_ css /* Style sheet directory */
| |_layouts.css
| |_styles.css
Search WWH ::

Custom Search