Khi các mã trước thay thế thẻ trước đó và các thuộc tính phong cách, kết quả là như trong hình 12-10. Bạn có thể thấy điều này dễ dàng hơn trên 12-10: Chỉ định màu nền ẩn các vấn đề văn bản chồng chéo. | Chapter 14 Web Sites versus Web Pages Figure 14-2 shows the result of running the preceding two code snippets from a Web server. Note that the file requires an .shtml filename suffix to work correctly. Figure 14-2 Demonstration of some useful server-side includes. SSI environment variables Many useful SSI environment variables are accessible to HTML documents through the echo server-side include. In addition to the CGI variable set shown in Chapter 9 the variables shown in Table 14-1 are also accessible. Table 14-1 SSI Environment Variables Variable Function DOCUMENT_NAME Name of the current document DOCUMENT_URI Virtual path to current document such as home taylor QUERY_STRING_UNESCAPED Unescaped version of any search query sent by the client with all shell-special characters escaped with DATE_LOCAL Current date local time zone. Subject to the timefmt parameter of the config directive DATE_GMT Identical to DATE_LOCAL but in Greenwich mean time LAST_MODIFIED Current document s last modification date of subject to timefmt like the other variables 320 Creating Cool Web Sites with HTM L XHTM L and CSS Here s an example of how to write a small HTML snippet that includes almost all of these SSI variables table border 1 cellpadding 4 cellspacing 1 tr td bgcolor DDDDDD DOCUMENT NAME td td - echo var DOCUMENT_NAME - td tr tr td bgcolor DDDDDD DOCUMENT URI td td - echo var DOCUMENT_URI - td tr tr td bgcolor DDDDDD DATE_LOCAL td td - echo var DATE_LOCAL - td tr tr td bgcolor DDDDDD DATE_GMT td td - echo var DATE_GMT - td tr tr td bgcolor DDDDDD LAST_MODIFIED td td - echo var LAST_MODIFIED - td tr table Figure 14-3 shows the results when you feed this code snippet through a Web browser by way of a Web server. Note that the file must have a .shtml suffix for your Web server to recognize that it contains SSI instructions. Figure 14-3 You can use SSI variables to display interesting information. Chapter 14 Web Sites versus Web Pages Building a Web site using SSI The