Template not parsed?

From: Date: Thu, 27 Feb 2003 14:16:51 +0000
Subject: Template not parsed?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8256@lists.php.net to get a copy of this message
Hello. I started using Smarty for the first time today and I ran into a problem. I have the following index.php file: <?php setlocale("LC_TIME", "GR"); require 'Smarty.class.php'; $smarty = new Smarty; $smarty->assign("name", "John"); if($smarty->template_exists('announce.tpl')) { $smarty->display('announce.tpl'); } else die("Error!"); ?> My announce.tpl template looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-7"> <title>This is a test</title> </head> <body bgcolor="#ffffff"> <table width="400" border="0" cellspacing="10" cellpadding="0"> <tr> <td><br> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="1" height="20" rowspan="2" bgcolor="#000000"><img src="images/spacer.gif" width="1" height="1" alt=""></td> <td align="left" valign="middle" nowrap bgcolor="#f0ece8" height="20" rowspan="2" background="images/announceline2.gif"><font size="2" face="Verdana">&nbsp;<b>Áíáêïßíùóç</b> - <b><a href="ann.html">{$name}</a></b></font></td> <td height="1" colspan="2"><img src="images/spacer.gif" width="1" height="1" alt=""></td> <td width="19" height="1"></td> </tr> <tr height="19"> <td width="19" height="19"><img src="images/announcetab.gif" width="19" height="19" alt=""></td> <td align="center" valign="middle" nowrap width="100%" height="19" background="images/tab.gif"><font size="1" face="Verdana">{$smarty.now|date_format:"%A, %e %B, %Y | %H:%M %p"}</font></td> <td align="center" valign="middle" nowrap width="19" height="19"><img src="images/announcetab2.gif" alt="" height="19" width="19" border="0"></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="1" rowspan="2" bgcolor="#000000"><img src="images/spacer.gif" width="1" height="1" alt=""></td> <td width="100%" bgcolor="#f0ece8"> <table width="100%" border="0" cellspacing="5" cellpadding="0" height="100%"> <tr> <td align="left" valign="top"><font size="2"><br> <form action="(EmptyReference!)" method="get" name="FormName"> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#acacac"> <table width="100%" border="0" cellspacing="1" cellpadding="10"> <tr> <td align="left" valign="middle" bgcolor="#faf7f2"><font size="2" face="Verdana"><b>ÈÝìá:</b></font><font size="2"><b> </b><input type="text" name="topic" size="68" maxlength="60" tabindex="1" border="0"></font><font size="1">&nbsp;</font></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <font size="1"><br> </font><font size="2"> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#acacac"> <table width="100%" border="0" cellspacing="1" cellpadding="10"> <tr> <td bgcolor="#faf7f2"> <div align="justify"> <font size="2" face="Verdana"><b>ÌÞíõìá:</b></font><font size="1" face="Verdana"><b><br> <br> </b></font><font size="2" face="Verdana"><textarea name="message" rows="15" cols="62" tabindex="2"></textarea></font></div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </font><font size="1"><br> </font> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#acacac"> <table width="100%" border="0" cellspacing="1" cellpadding="10"> <tr> <td align="left" valign="middle" bgcolor="#faf7f2"><font size="2" face="Verdana"><b>ÓõíçììÝío áñ÷åßo: </b></font><font size="2"><b><input type="file" name="attachment" size="25" tabindex="3" align="middle" border="0"><br> </b></font></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <font size="2"><b><br> </b></font> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#acacac"> <table width="100%" border="0" cellspacing="1" cellpadding="10"> <tr> <td align="center" valign="middle" bgcolor="#faf7f2"><font size="2"><b><input type="submit" name="submit" value="ÁðïóôïëÞ" tabindex="4" border="0">&nbsp;&nbsp;&nbsp;<input type="reset" value="Êáèáñéóìüò öüñìáò" tabindex="5" border="0"></b></font></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </form> </td> </tr> </table> </td> <td width="1" rowspan="2" bgcolor="#000000"><img src="images/spacer.gif" width="1" height="1" alt=""></td> </tr> <tr> <td width="100%" height="1" bgcolor="#000000"><img src="images/spacer.gif" width="1" height="1" alt=""></td> </tr> </table> </td> </tr> </table> </body> </html> When I run index.php all I get is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-7"></HEAD> <BODY></BODY></HTML> Can anyone tell me what's wrong? Thank you in advance, Argiris

« previous php.smarty.general (#8256) next »