23 lines
538 B
PHP
23 lines
538 B
PHP
<?php
|
|
header("Content-type: text/html;charset=utf-8");
|
|
header("Access-Control-Allow-Origin: *");
|
|
define('APPIN',true);
|
|
define('DEBUG',true);
|
|
define('ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
|
|
require(ROOT."./inc/bll.php");
|
|
|
|
//统一入口模式
|
|
//使用?app=folder.file模式指定文件
|
|
$getApp = r('M');
|
|
if(isn($getApp))$getApp=rq('app');
|
|
if(strlen($getApp)==0){
|
|
$getApp='board';
|
|
}
|
|
|
|
if(isset($V[$getApp]))$getApp=$V[$getApp];
|
|
$file = str_replace('.',DIRECTORY_SEPARATOR,$getApp).'.php';
|
|
require(ROOT.$file);
|
|
|
|
@$mongo->close();
|
|
?>
|