小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

微擎模塊管理的執(zhí)行路由

 人生大義 2017-11-12

執(zhí)行 http:///web/index.php?c=site&a=entry&eid=6 系統(tǒng)是如何找到具體模塊中的對應(yīng)方法的?下面簡單梳理一下:

 

web目錄下的index.php 包含了require '../framework/bootstrap.inc.php';

在bootstrap.inc.php的最后讀取controller,action,do

 

$controller = $_GPC['c'];
$action = $_GPC['a'];
$do = $_GPC['do'];

 

index.php繼續(xù)往下走,require _forward($controller, $action);
function _forward($c, $a) {
$file = IA_ROOT . '/web/source/' . $c . '/' . $a . '.ctrl.php';
return $file;
}

包含了 /web/source/site/entry.ctrl.php

 

在entry.ctrl.php里:
從ims_modules_bindings表里讀取eid=6的記錄到$entry,然后根據(jù)記錄加載模塊,

$site = WeUtility::createModuleSite($entry['module']);
define('IN_MODULE', $entry['module']);
...
$method = 'doWeb' . ucfirst($entry['do']);
exit($site->$method());

 

例如$entry['do']是stores,那實際調(diào)用的方法是模塊目錄下site.php里的doWebStores

文章來源:http://

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多