日期:2014-05-17  浏览次数:20489 次

smarty模板
请问 tpl 文件用什么东东编译  我用dreamweaver  打开*.tpl 改动了一下  在按F12运行 。发现编译后的 %%B2^B29^B298BD0A%%index.tpl.php文件变成如下代码。 那么请问tpl文件用什么软件编译。   
---
<?php /* Smarty version 2.6.19, created on 2013-01-27 14:47:15
         compiled from 06/index.tpl */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{$title}</title>
<link rel='stylesheet' href="../css/style.css" />
</head>
<body>
<p>
{if $smarty.get.type == 'tm'}
欢迎光临,{$smarty.get.type}
{else}
对不起,您不是本站VIP,无权访问此栏目。
{/if}
</body>
</html>

------解决方案--------------------
任何软件都可以,记事本都行,只要你符合smarty和html的语法就可以

.tpl.php改变了说明正确了啊,这里存放的本来就是smarty编译好的模板吧

不知道你改动了啥,又产生了什么区别,你想得到什么结果?
------解决方案--------------------
你修改了 smarty 的定界符!
所以默认的定界符 {、} 就原样输出了