好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 網(wǎng)站建設(shè) > 建站知識 > dedecms系統(tǒng)$GLOBALS定義文件在哪

dedecms系統(tǒng)$GLOBALS定義文件在哪

POST TIME:2018-03-17 12:13

DedeCMS數(shù)據(jù)庫的信息是寫在data/common.inc.php,而系統(tǒng)連接數(shù)據(jù)庫時使用的有一個函數(shù)是:
functionInit($pconnect=FALSE){
$this->linkID=0;
$this->dbHost=$GLOBALS['cfg_dbhost'];//$GLOBALS在哪把信息放入$GLOBALS的?
$this->dbUser=$GLOBALS['cfg_dbuser'];
$this->dbPwd=$GLOBALS['cfg_dbpwd'];
$this->dbName=$GLOBALS['cfg_dbname'];
$this->dbPrefix=$GLOBALS['cfg_dbprefix'];
$this->result["me"]=0;
$this->Open($pconnect);}
它是在哪把信息放入$GLOBALS中的?

回復(fù):

$GLOBALS是全局變量數(shù)組
凡是在函數(shù)和類以外定義的變量都在其中出現(xiàn)
比如$GLOBALS['cfg_dbhost']就在common.inc.php中有$cfg_dbhost='~dbhost~';
當(dāng)加載common.inc.php后就有$GLOBALS['cfg_dbhost']



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266