httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew <and...@aaaaaaaa.demon.co.uk>
Subject #echo and (none)...
Date Sun, 19 Nov 1995 11:49:33 GMT
mod_include.c, handle_echo() works so that a comment like:

	the value of FOOBAR is <!--#echo var="FOOBAR" -->

will actually print out:

	the value of FOOBAR is (none)

where the '(none)' is hard coded, and indicates that FOOBAR has not been 
set.  I've not noticed this behaviour before (I mean, I've never tried 
printing out a var that I didn't know to be really there) and I wonder 
how helpful it really is.  As it stands we can't play the trick:

	<!--#echo var="HEADER" -->
	blah, blah, blah....
	<!--#echo var="FOOTER" -->

which only includes the values of $HEADER, $FOOTER if they've been 
defined and otherwise prints "", it's a bit like a contitional include.  
This example might let you define server-wide headers and footers for 
your pages, albeit in a slightly crusty way.

Does anyone *rely* on the '(none)' value being printed if the var is unset?

Just curious,
Ay.

Mime
View raw message