diff --git a/index.php b/index.php index 3e584dc..f029312 100644 --- a/index.php +++ b/index.php @@ -6,6 +6,7 @@ include 'conststr.php'; include 'common.php'; //echo '
'. json_encode($_SERVER, JSON_PRETTY_PRINT).'
'; +//echo '
'. json_encode($_ENV, JSON_PRETTY_PRINT).'
'; if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') { if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/TencentSCF_file.php'; else include 'platform/TencentSCF_env.php'; @@ -30,6 +31,19 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') { } http_response_code($re['statusCode']); echo $re['body']; +} elseif (isset($_SERVER['DOCUMENT_ROOT'])&&$_SERVER['DOCUMENT_ROOT']==='/var/task/user') { + include 'platform/Vercel.php'; + $path = getpath(); + //echo 'path:'. $path; + $_GET = getGET(); + //echo '
'. json_encode($_GET, JSON_PRETTY_PRINT).'
'; + $re = main($path); + $sendHeaders = array(); + foreach ($re['headers'] as $headerName => $headerVal) { + header($headerName . ': ' . $headerVal, true); + } + http_response_code($re['statusCode']); + echo $re['body']; } else { include 'platform/Normal.php'; $path = getpath();