比如下面这个foreach里面的 $GLOBALS['smarty']->_var['cat']['id']
<!--{foreach from=get_categories_tree(1) item=cat name=cat0}-->
<?php
$cat_info = get_cat_info_ex($GLOBALS['smarty']->_var['cat']['id']);
//var_dump( $cat_info );
?>
<!--{/foreach}-->
$GLOBALS['smarty']->_var['cat']['id']
_var 是在哪里定义的,而它后面的元素['cat']['id']是从foreach里面的item=cat拿的还是从 缓存文件里面拿的?
类似的还有
$GLOBALS['smarty']->_var['nav']['cid']
$GLOBALS['smarty']->_var['nav']['url']
$GLOBALS['smarty']->_var['goods_cat']['id']
$GLOBALS['smarty']->_var['category']
$GLOBALS['smarty']->_var['buy_goods']['last_price_no_format']
...
------解决方案--------------------
foreach里面的item=cat拿的
includes\cls_template.php 查找 function push_vars 里面有写