1

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" -->
sebix
  • 2,943
  • 2
  • 28
  • 43

1 Answers1

1

see wikipedia: Server Side Includes

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

gstrauss
  • 2,091
  • 1
  • 12
  • 16
  • This works. But when I try to do something similar to the variable. Instead of it storing the value of HTTP_ACCEPT, it stores the string HTTP_ACCEPT – lemonadeice Feb 05 '21 at 00:35
  • 1
    I would suggest reading the documentation [lighttpd mod_ssi documentation](https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSSI) and then trying to find an alternate route to do whatever it is you are trying to do. Server-Side-Includes offers a very limited set of options. A full scripting language allows much more. – gstrauss Feb 06 '21 at 01:07