ecshop中初始化会员数据整合类的unserialize()的疑问

WBOY
Release: 2016-06-23 13:52:37
Original
1205 people have browsed it

ecshop中lib_common.php中的

/** * 初始化会员数据整合类 * * @access  public * @return  object*/function &init_users(){    $set_modules = false;    static $cls = null;    if ($cls != null)    {        return $cls;    }    include_once(ROOT_PATH . 'includes/modules/integrates/' . $GLOBALS['_CFG']['integrate_code'] . '.php');    $cfg = unserialize($GLOBALS['_CFG']['integrate_config']);    $cls = new $GLOBALS['_CFG']['integrate_code']($cfg);    return $cls;}
Copy after login



$cfg = unserialize($GLOBALS['_CFG']['integrate_config']);

全局$GLOBALS['_CFG']['integrate_config']这个变量没有找到,好像没有定义['integrate_config']啊?
这一步到底是为什么这样做呢,$cfg的值是什么呢?


回复讨论(解决方案)

查找整个文件夹 搜索  $GLOBALS  找

查找整个文件夹 搜索  $GLOBALS  找



在lib_common.php中function load_config()对$GLOBALS全局变量赋值,但是没有找到$GLOBALS['_CFG']['integrate_config']这个值,所以疑惑,

$cfg = unserialize($GLOBALS['_CFG']['integrate_config']);

觉得应该是shop_config 这个数据表中的integrate_config

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!