/* installed or not. */
if(!isset($config->installed) or !$config->installed) die(header('location: install.php'));
/* Run the app. */
$common = $app->loadCommon(); //这里处理了公司名
在framework/base/router.class.php中
public function loadCommon()
{
$this->setModuleName('common');
$commonModelFile = $this->setModelFile('common');
if(!file_exists($commonModelFile)) return false;
helper::import($commonModelFile);
if($this->config->framework->extensionLevel == 0 and class_exists('commonModel')) return new commonModel();
if($this->config->framework->extensionLevel > 0 and class_exists('extCommonModel')) return new extCommonModel();
if(class_exists('commonModel')) return new commonModel();
return false;
}
在module/common/model.php中
public function setCompany()
{
$httpHost = $this->server->http_host;