Home > Backend Development > PHP Tutorial > ecshop 里面的$GLOBALS['smarty']->var里面的_var是在哪定义的替什么是_var而不是其他

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

WBOY
Release: 2016-06-13 11:49:18
Original
1886 people have browsed it

ecshop 里面的$GLOBALS['smarty']->_var里面的_var是在哪定义的为什么是_var而不是其他?
比如下面这个foreach里面的  $GLOBALS['smarty']->_var['cat']['id']

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template