Apache Guide: Introduction to Server Side Includes, Part 2 Page 2
And you can
config the format in which file sizes are returned
sizefmt attribute. You can specify
a full count in bytes, or
abbrev for an abbreviated number in Kb
or Mb, as appropriate.
I expect that I'll have an article some time in the coming months about
using SSI with small CGI programs. For now, here's something else that you can
do with the
exec element. You can actually have SSI execute a
command using the shell (
/bin/sh, to be precise--or the DOS shell,
if you're on Win32). The following, for example will give you a directory
<pre> <!--#exec cmd="ls" --> </pre>
or, on Windows
<pre> <!--#exec cmd="dir" --> </pre>
You might notice some strange formatting with this directive on Windows,
because the output from
dir contains the string
dir>" in it, which confuses browsers.
Note that this feature is exceedingly dangerous, as it will execute whatever
code happens to be embedded in the
exec tag. If you have any
situation where users can edit content on your web pages, such as with a
guestbook, for example, make sure that you have this feature disabled. You can
allow SSI, but not the
exec feature, with the
IncludesNOEXEC argument to the
In the next column, I'll talk about some of the more advanced features of SSI, in particular, the flow-control feature (conditional statements) and using variables.
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...