httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
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
exists. 

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.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message