热搜:NVER node 开发 php

ecshop 里面的$GLOBALS['smarty']->_var里面的_var是在哪定义的为什么是_var而不是其他?

2024-09-04 09:50:01
ecshop 里面的$GLOBALS['smarty']->_var里面的_var是在哪定义的为什么是_var而不是其他?

比如下面这个foreach里面的   $GLOBALS['smarty']->_var['cat']['id']

<?php
$cat_info = get_cat_info_ex($GLOBALS['smarty']->_var['cat']['id']);
//var_dump( $cat_info );
?>


$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 里面有写