<?php
$lane=getenv('ARE_LANE');$root=getenv('ARE_ROOT');$expected=$lane==='B'?'/tmp/zhct-http-store-mysql.dQTTBP':'/tmp/zhct-dm-poc-20260928.fcpiiN/store';
if(!in_array($lane,['B','C'],true)||$root!==$expected||is_link($root)){http_response_code(503);exit;}$path=parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);
if(!(($path==='/__poc_boundary'&&$_SERVER['REQUEST_METHOD']==='GET')||(in_array($path,['/api/dining_config/areaList','/api/dining_config/areaOptions'],true)&&$_SERVER['REQUEST_METHOD']==='POST'))){http_response_code(403);exit;}
$_SERVER['PATH_INFO']=$path;require $root.'/env.php';if(!function_exists('json')){function json($data=[],$code=200,array $header=[],$options=[]){return \think\Response::create($data,'json',$code,$header,$options);}}
if(getenv('POC_EXTERNAL_STUBS')!=='1'){http_response_code(503);exit;}require $root.'/external_stubs.php';define('APP_PATH',__DIR__.'/source/application/');define('RUNTIME_PATH',__DIR__.'/runtime/');require $root.'/thinkphp/base.php';
\think\App::initCommon();\think\Request::instance()->pathinfo();\think\Log::init(['type'=>'File','path'=>__DIR__.'/runtime/safe-log/','level'=>['no_raw_application_log']]);\think\Config::set(['type'=>'File','path'=>__DIR__.'/cache/','prefix'=>'ARE10_'],'cache');$database=require $root.'/application/database.php';\think\Config::set($database,'database');\think\Db::clear();
if($path==='/__poc_boundary'){header('Content-Type: application/json');echo json_encode(['business'=>(string)\think\Config::get('business'),'business_constant'=>BUSINESS,'school_feature'=>strtolower(trim((string)\think\Config::get('business')))==='zhct_stzc','external_stubs'=>class_exists(\app\common\Serve::class,false),'original_debug'=>$database['debug']??null]);exit;}\think\App::run()->send();
