Lighttpd SSI: Setting variable to value of HTTP_ACCEPT

173 views Asked by At

I am using this shtml file for testing.

<!--#set var="lemon" value="HTTP_ACCEPT" -->
<!--#echo var="lemon" -->
<!--#include virtual="HTTP_ACCEPT" -->
<!--#include file="HTTP_ACCEPT" -->
<!--#fsize virtual="HTTP_ACCEPT" -->
<!--#flastmod virtual="HTTP_ACCEPT" -->

This echoes the value stored in the variable lemon, but the variable lemon does not have the value of HTTP_ACCEPT. How do I fix this?

I have tried it like this too.

<!--#set var="lemon" value="$HTTP_ACCEPT" -->
<!--#echo var="lemon" -->
<!--#include virtual="HTTP_ACCEPT" -->
<!--#include file="HTTP_ACCEPT" -->
<!--#fsize virtual="HTTP_ACCEPT" -->
<!--#flastmod virtual="HTTP_ACCEPT" -->
1

There are 1 answers

2
gstrauss On

see wikipedia: Server Side Includes

<!--#echo var="HTTP_ACCEPT"-->