From 9223b97deed5d55080d85e406bb37572d27a6bd2 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 18 Jan 2020 00:31:58 +0800 Subject: [PATCH] Update index.php --- index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.php b/index.php index 21dd0ec..5aff93b 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,17 @@ if ($_SERVER['USER']==='qcloud') { include 'function/scf.php'; } elseif ($_SERVER['HEROKU_APP_DIR']==='/app') { include 'function/heroku.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 'function/normal.php'; $path = getpath();