httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] How to test whether a file exist in a ssi page?
Date Fri, 09 May 2008 13:22:03 GMT
On Fri, May 9, 2008 at 4:05 AM, Thorsten Scherler
<thorsten.scherler.ext@juntadeandalucia.es> wrote:
> 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.

See:
http://httpd.apache.org/docs/2.2/mod/mod_include.html#ssienableaccess

I'm not actually sure if it works. I've never tried it, and I heard
that the directive is actually named SSIAccessEnable rather than
SSIEnableAccess.

Joshua.

---------------------------------------------------------------------
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