Files

39 lines
943 B
PHP

<?php
// 加载框架引导文件
define('APP_PATH', __DIR__ . '/../../../application/');
// 加载框架引导文件
require __DIR__ . '/../../../thinkphp/base.php';
function url(){}
// 关闭路由
\think\App::route(false);
$request = \think\Request::instance();
$paramArr = explode('/', $request->pathinfo());
$result = [];
for ($i = 0; $i < count($paramArr); $i += 2) {
$key = $paramArr[$i];
$value = isset($paramArr[$i + 1]) ? $paramArr[$i + 1] : null;
$result[$key] = $value;
}
if(!empty($result) &&isset($result['uniacid'])){
define('UNIACID',$result['uniacid']);
}else{
// return false;
}
//这里适配了database配置文件中获取微擎配置
//define('IA_ROOT','../../../..');
//define('MODULE_URL',str_replace("payment/notify","",__DIR__));
//define('IN_IA','payment');
//define('W7_ROUTE','api/pay/notifyx');
//$request->path('api/pay/notifyx');
// 执行应用
\think\App::run($request)->send();
?>