 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
mariyam7 Smarty n00b
Joined: 15 Nov 2006 Posts: 2
|
Posted: Wed Nov 15, 2006 1:45 am Post subject: Smarty->display() problem |
|
|
Smarty does not render the html file in the browser...it displays the raw html.
if the html file is opened directly it works...
Also IE display the formatted html after a couple of refreshes but Firefox never displays it correctly
the template file(sap_3.tpl.html) looks like this
<html>
<head>
<script type="text/javascript" src="../lib/cpaint/cpaint2.inc.js"></script>
<script type="text/javascript" src="../webroot/js/sap.js"></script>
</head>
<body>
<div>
<form action="" method="POST">
<table>
<tr>
<td>
<select id="zonelist" size="{$zoneNo}">
{html_options values=$zoneID output=$zoneName}
</select>
</td>
<td align="center">
<input type="button" id="add" value="Add" onClick="addZone()"></input><br>
<input type="button" id="moveUp" value="^" onClick="moveUp()"></input><br>
<input type="button" id="moveDown" value="V" onClick="moveDown()"></input><br>
<input type="button" id="delete" value="Delete" onClick="deleteZone()"></input>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
PLEASE HELP!!!!
--Mariyam |
|
| Back to top |
|
Ez4Me2KU Smarty n00b
Joined: 20 Aug 2003 Posts: 4
|
Posted: Tue Jan 09, 2007 10:39 am Post subject: |
|
|
I think this is not a smarty problem.
PHP may have a header('Content-type: text/plain'); instead of header('Content-type: text/html');
Check your sources with something similar. |
|
| Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5608 Location: Toronto, Canada
|
Posted: Tue Jan 09, 2007 2:02 pm Post subject: |
|
|
Browsers render HTML. Smarty generates text (usually HTML). PHP and your webserver deliver the result to your browser.
Are you trying to browse to your template file directly from your browser? That won't work. |
|
| Back to top |
|
mariyam7 Smarty n00b
Joined: 15 Nov 2006 Posts: 2
|
Posted: Wed Jan 10, 2007 11:20 pm Post subject: |
|
|
Thanks!!
But it was a problem due to combination of CPAINT and SMARTY in PHP.
--Mariyam |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|