Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI conditional problem 1

Status
Not open for further replies.

Dweezel

Technical User
Feb 12, 2004
428
GB
I'm trying to add a conditional comment either outside or inside an ssi include.

I'm using a remote apache server. Here's the server info from phpinfo():

Code:
 	Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7f

Both the webpage and the include have a .shtml file extension. I tried the following code as a test but all I get is error messages:

Code:
     <!--#set var="lang" value="french" -->	


     <!--#if lang="french" -->

     <!--#include virtual="../_includes/header.shtml" -->

     <!--#endif -->

I also tried:

Code:
     <!--#set var="lang" value="french" -->	


     <!--#if $(lang)="french" -->

     <!--#include virtual="../_includes/header.shtml" -->

     <!--#endif -->

All I'm getting is the following double error message:
[an error occurred while processing this directive]
[an error occurred while processing this directive]

Can anyone see anything wrong with my syntax? I've never used ssi before so I'm guessing it's something I'm doing wrong.

TIA.
 
Also, is using conditional comments within an ssi include possible, given that the include also has a '.shtml' extension?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top