0% found this document useful (0 votes)
36 views3 pages

Server Side Include

This document contains examples of server-side include directives in HTML files. It includes the include, echo, exec, fsize and flastmod directives. The include directive embeds the contents of other files. The echo directive prints variables like the date. The exec directive runs system commands and includes their output. The fsize and flastmod directives print the size and last modification date of files.

Uploaded by

Sahil Mahajan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views3 pages

Server Side Include

This document contains examples of server-side include directives in HTML files. It includes the include, echo, exec, fsize and flastmod directives. The include directive embeds the contents of other files. The echo directive prints variables like the date. The exec directive runs system commands and includes their output. The fsize and flastmod directives print the size and last modification date of files.

Uploaded by

Sahil Mahajan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

HEADER FILE

<html>
<head>
<title>Server Side includes: Include Directive</title>
</head>
<body bgcolor="green">
<h1> You are at www.opensourcewebbook.com</h1>

FOOTER FILE
<hr>
<br>
<a
href="http://www.opensourcewebbook.com/">http://www.opensourcewebbook.com/<
/a>
<br>Date: <!--#echo var="DATE_LOCAL"-->
</body>
</html>

INCLUDE DIRECTIVE
<!--#include file="header.html"-->
here is the stuff between what was included.
<!--#include file="footer.shtml"-->
===================================================
=================================
ECHO DIRECTIVE
<html>
<head>
<title>
Server Side includes: echo directive</title>
</head>
<body bgcolor="cyan">

<h1>Examples of echo directive</h1>


File name: <b><!--#echo var="DOCUMENT_NAME"--></b>
<br>
URI:<b><!--#echo var="DATE_LOCAL"--></b>
<br>
GMT:<b><!--#echo var="DATE_GMT"--></b>
<br>
Last modified: <b><!--#echo var="LAST_MODIFIED"--></b>
</body>
</html>
===================================================
=================================
EXEC DIRECTIVE
<head>
<head>
<title>Server Side includes: exec directive</title>
</head>
<body bgcolor="cyan">
<h1>Example of exec directive</h1>
Running Process' Information
<pre>
<!--#exec cmd="/bin/ps -ef"-->
</pre>
Here is the disk usage summary for /home:
<pre>
<!--#exec cmd="/bin/df /home"-->
</pre>

</body>
</html>
===================================================
==================================
FSIZE AND FLASTMOD
<html>
<head>
<title>Server side includes: fsize and flastmod Directive</title>
</head>
<body bgcolor="cyan">
<h1> examples of the fsize and flastmod directive</h1>
the file echo.html was last modified
<!--#flastmod file="echo.shtml"-->
<br>
<!--#config sizefmt="bytes"-->
And its size is:
<!--#fsize file="echo.shtml"-->bytes
<br>
<!--#set var="name" value="Ron"-->
Name is:<!--#echo var="name"-->
<body>
</html>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy