httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject [users@httpd] How to test whether a file exist in a ssi page?
Date Fri, 09 May 2008 08:05:27 GMT
Hi all,

how can I test whether a file exist in a ssi page?

I have following 
<!--#set var="name" value="$DOCUMENT_ROOT/2008/88/test.html" -->
which will return me the path of the file that I need to include if

Now I want to test whether or not this file exists.

A working but ugly way is the following:
<!--#config errmsg=""-->
<!--#include virtual="/2008/88/test.html"-->

I would like to do something:
<!--#if expr="$DOCUMENT_ROOT/2008/88/test.html"-->
<!--#include virtual="/2008/88/test.html"-->
<!--#else -->
No information available.
<!--#endif -->

Where I do not know which expression to use to do
expr="$DOCUMENT_ROOT/2008/88/test.html EXIST" 

TIA for any ideas.

Thorsten Scherler                       
Open Source Java                      consulting, training and solutions

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message