richpasco Posted April 17, 2007 Share Posted April 17, 2007 This might be a FAQ, but I couldn't find it... I want to define some server-side includes (SSI) variables for some short HTML code snippets and use them in my SHTML files, like this: [pre] <!--#set var="hours" value="Monday–Friday<BR>8 a.m.–5 p.m." --> ... <!--#echo var="hours" --> [/pre] My problem is that Apache "escapes" my intended HTML code and entities, so that the browser receives [pre] Monday–Friday<BR>8 a.m.–5 p.m. [/pre] and so it displays my HTML snippet instead of executing it. How can I work around this problem? One idea I had was to put each snippet into its own file and then include it, like this: [pre] <!--#include file="hours.shtml" --> [/pre] The problem is, I have dozens of such snippets, and I don't want to clutter my disk with dozens of one-line files. Are there any better ideas? - Rich Quote Link to comment Share on other sites More sharing options...
richpasco Posted April 17, 2007 Author Share Posted April 17, 2007 I found the answer:[pre]<!--#echo encoding="none" var="hours" -->[/pre]The part 'encoding="none"' does the trick. - Rich Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.