index.php

来自「phpcms2007很好的cms内容管理系统,操作方便」· PHP 代码 · 共 36 行

PHP
36
字号
<?php
require './include/common.inc.php';
$strings = explode('/',$PHP_QUERYSTRING);
$enterprise = intval($strings[0]);
if(!$MOD['enableSecondDomain'] && $enterprise)
{
	$_userdir = substr($enterprise,0,2);
	$datafile = MOD_ROOT.'/web/userdata/'.$_userdir.'/'.$enterprise.'/index.php';
	file_exists($datafile) ? include $datafile : exit($LANG['site_no_exists']);
}
else
{
	$head['title'] = $MOD['seo_title'];
	$head['keywords'] = $MOD['seo_keywords'];
	$head['description'] = $MOD['seo_description'];

	$lastedittime = @filemtime('index_update.html');
	$lastedittime = $PHP_TIME-$lastedittime;
	$autoupdatetime = intval($MOD['autoupdate']);
	if(file_exists('index_update.html') && $lastedittime<$autoupdatetime)
	{	
		include 'index_update.html';
	}
	else
	{
		ob_start();
		include template($mod, 'index');
		$data .= ob_get_contents();
		ob_clean();
		file_put_contents('index_update.html', $data);
		@chmod('index_update.html', 0777);	
		echo $data;
	}
}
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?