所以,基本上,我只是偶然发现了PHP的一个框架或其他功能,这是我从未见过的。所有的函数都是用PHP-oop类型编写的,但html文件位于非常深的位置(在文件夹中),下面是html文件之一的例子
http://jsfiddle.net/x2tgt/
代码-
<h1>{$category[0].name}</h1>
<table cellpadding="0" cellspacing="0" width="100%">
{section name=id loop=$products}
<tr>
{section name=id2 loop=$products[id]}
{if $products[id][id2].id}
<td width="100%" valign="top" width="130">
<table cellpadding="1" cellspacing="0" width="100%">
<tr>
<td valign="top" align="left" width="195">
<a href="{$smarty.const._URL_ROOT}/{$page.lang}/product/{$products[id][id2].id}/{if $page.eshop eq 1}1/{/if}"><img src="{$smarty.const._URL_PREFIX}/data/img/{$products[id][id2].filename}_list.jpg" alt="" /></a>
</td>
<td width="15"></td>
<td valign="top" align="left">
<a href="{$smarty.const._URL_ROOT}/{$page.lang}/product/{$products[id][id2].id}/{if $page.eshop eq 1}1/{/if}"><h1>{$products[id][id2].name}</h1></a>
{if $page.eshop eq 1}
<table cellpadding="0" cellspacing="0" class="prodListPrice">
<tr>
<td colspan="3" class="top"> </td>
</tr>
<tr>
<td class="middle">
##PROD_PRICE_1##<br/>
<span>{$products[id][id2].price_1} {$products[id][id2].price_from|stripslashes}</span>
</td>
<td class="middle">
##PROD_PRICE_2##<br/>
<span>{$products[id][id2].price_2} {$products[id][id2].price_from|stripslashes}</span>
</td>
</tr>
<tr>
<td colspan="3" class="bottom"> </td>
</tr>
</table>
{/if}
<div class="br5"></div>
<div>{$products[id][id2].stext|stripslashes}</div>
</td>
</tr>
</table>
</td>
{else}
<td>
</td>
{/if}
{/section}
</tr>
你知道这可能是什么类型的框架吗?
这是一个Smarty模板。我不确定哪些(如果有的话)框架使用Smarty作为视图模板引擎。
Smarty是一个模板引擎,而不是一个框架。人们可以在任何现有的框架中使用smarty。一些电子商务和CMS系统仍然像X-cart一样使用智能。如果你在smarty中发现了一些对你有用的东西,比如模板的缓存,你可以用任何你喜欢的框架来配置smarty。