Download presentation
Presentation is loading. Please wait.
Published byBeatrice Conley Modified over 8 years ago
1
Server Side Scripting Perl, Python, Java Servlets write complete programs in (Perl, Python, Java) to process HTTP requests and generate a complete HTTP response, including (X)HTML output SSI, PHP, Java Server Pages embed a script (PHP, Java) in an (X)HTML page which generates the dynamic content
2
Server Side Includes (SSI) behaves like the C/C++ pre-processor except for html textual inclusion conditional code limited dynamic content generation simple templating system
3
SSI Configuration requires: mod_mime.c and mod_include.c Enable SSI for the directory Options +Includes generate correct mime type for SSI files: AddType text/html.shtml run.shtml files through the SSI engine AddHandler server-parsed.shtml
4
SSI Usage name the file with the.shtml enclose the SSI directive inside a XHTML comment:
5
include this is the main body of the doucment foo.shtml
6
Limitations of the file attribute interpreted as relative to the current document cannot include../ in the path to refer to files above the current document use the virtual attribute instead: virtual attribute is a relative URI and goes through the same permissions processing as any other request from the client virtual attribute can identify a CGI script
7
echo The current time is: This page was last modified on: foo.shtml
8
echo variables DATE_GMT, DATE_LOCAL – current time in Greenwich Mean Time and local formats DOCUMENT_NAME – filename requested by client DOCUMENT_URI – URI path requested by the client LAST_MODIFIED – last modification time of file requested by client any other CGI environment variable
9
Conditional Code BrowserMatchNoCase macintosh Mac BrowserMatchNoCase MSIE InternetExplorer Bummer! WooHoo! httpd.conf fancy.shtml
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.