unset($MCONF);
require('init.php');
require('template.php');
// Find module path:
$temp_M = (string)t3lib_div::_GET('M');
if ($temp_path = $TBE_MODULES['_PATHS'][$temp_M]) {
$MCONF['_'] = 'mod.php?M='.rawurlencode($temp_M);
require($temp_path.'conf.php');
$BACK_PATH='';
require($temp_path.'index.php');
} else {
#debug($TBE_MODULES);
die('Value "'.htmlspecialchars($temp_M).'" for "M" was not found as a module');
}主要负责,根据请求参数‘M’(module名称)加载相应的module
[list]
[*]加载配置文件 conf.php
[*]加载主文件 index.php
[/list]
本文介绍了一个基于PHP的模块加载机制,该机制通过解析URL参数'M'来确定加载哪个模块,并进一步加载对应的配置文件conf.php及主文件index.php。
491

被折叠的 条评论
为什么被折叠?



