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

主頁 > 網站建設 > 建站知識 > 織夢系統$GLOBALS定義文件在哪

織夢系統$GLOBALS定義文件在哪

POST TIME:2017-11-13 01:07

DedeCMS數據庫的信息是寫在data/common.inc.php,而系統連接數據庫時使用的有一個函數是:

function Init($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中的?

回復:

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



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

  • 400-1100-266