config,mapping,$GLOBALS
<blockquote>
<p>将多层的config和mapping数据合并后,写入$GLOBALS超全局数组</p>
</blockquote>
<pre><code class="language-plantuml">@startmindmap
* $GLOBALS
-- config.php =>["ZPHP_CONFIG"]
-- mapping.php => ["ZPHP_MAPPING"]
legend
**$GLOBALS实例**
["ZPHP_CONFIG"] =>array(8) {
["DEBUG"] =>bool(true)
["POWEREDBY"] =>string(10) "python.org"
["VER"] =>array(2) {
[0] =>string(3) "1.0"
[1] =>string(0) ""
}
["URL_MOD"] =>int(1)
["SESSION"] =>array(7) {
["httponly"] =>bool(true)
["name"] =>string(8) "APITOKEN"
["auto"] =>bool(false)
["host"] =>string(0) ""
["port"] =>string(0) ""
["pass"] =>string(0) ""
["database"] =>string(0) ""
}
["VIEW"] =>array(8) {
["php_tag"] =>string(3) "php"
["import_tag"] =>string(6) "import"
["template_tag"] =>string(8) "template"
["ext"] =>string(5) ".html"
["path"] =>string(7) "default"
["prefix"] =>string(2) "<{"
["suffix"] =>string(2) "}>"
["compress"] =>bool(true)
}
["DB"] =>array(8) {
["cache_mod"] =>int(1)
["cache_time"] =>int(60)
["dsn"] =>string(54) "mysql:host=127.0.0.1;dbname=xxxx_cc;port=3306"
["db"] =>string(16) "xxxx_cc"
["user"] =>string(16) "xxxx_cc"
["pass"] =>string(16) "xxxx_cc"
["charset"] =>string(7) "utf8mb4"
["prefix"] =>string(0) ""
}
["REDIS"] =>array(5) {
["host"] =>string(9) "127.0.0.1"
["port"] =>int(6379)
["expire"] =>int(600)
["database"] =>int(0)
["timeout"] =>int(0)
}
}
["ZPHP_MAPPING"] =>array(8) {
["Qiniu"] =>string(50) "D:/WWW/zphp/sdk/Qiniu/"
["z"] =>string(52) "D:/WWW/zphp/core/v0.1/z/"
["ext"] =>string(54) "D:/WWW/zphp/core/v0.1/ext/"
["ctrl"] =>string(60) "D:/WWW/zphp/app/study/v1.0/ctrl/"
["model"] =>string(61) "D:/WWW/zphp/app/study/v1.0/model/"
["lib"] =>string(59) "D:/WWW/zphp/app/study/v1.0/lib/"
["base"] =>string(60) "D:/WWW/zphp/app/study/v1.0/base/"
["common"] =>string(47) "D:/WWW/zphp/common/"
}
}
endlegend
@endmindmap</code></pre>