httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Webster <p...@dabdig.com>
Subject [users@httpd] Re: SSI and variable expansion with unary operators
Date Tue, 12 Mar 2019 15:29:05 GMT
Hello All,

Trying again with this one.
Is anyone able to repeat it using the example below and if yes ... is there a way to achieve
what I was trying to do (without
launching an external program)?

Paul Webster

On Mon, 04 Mar 2019 17:27:53 +0000, I wrote:

Hello,

I had expected the expression below to print out "File index.htm exists" given that it does
exist in same location as the page
that loads this ... but instead it tells me that it does not exist.

<!--#set var="filename" value="index.htm" -->
<!--#if expr='-F "%{filename}"' -->
	File <!--#echo var="filename" --> exists
<!--#else -->
	File <!--#echo var="filename" --> does not exist
<!--#endif -->

If I replace 
<!--#if expr='-F "${filename}"' -->
with
<!--#if expr='-F "index.htm"' -->
then it does find it.

I tried with %{filename} as well.

So - it appears that variables not expanded in this case or I am doing something wrong.
Any hints?

My real-world usage is more complicated because the var filename really is dynamically generated
based on current date/time.


Paul Webster

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message