From 9f9d4e48f8f8bc59bc16d5c371ffbea567548a90 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 5 Mar 2020 12:27:18 +0800 Subject: [PATCH] Update index.php --- index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 495bf52..ca57e67 100644 --- a/index.php +++ b/index.php @@ -18,8 +18,7 @@ if ($_SERVER['USER']==='qcloud') { header($headerName . ': ' . $headerVal, true); } http_response_code($re['statusCode']); - if ($re['isBase64Encoded']) echo base64_decode($re['body']); - else echo $re['body']; + echo $re['body']; } else { include 'function/normal.php'; $path = getpath(); @@ -33,8 +32,7 @@ if ($_SERVER['USER']==='qcloud') { header($headerName . ': ' . $headerVal, true); } http_response_code($re['statusCode']); - if ($re['isBase64Encoded']) echo base64_decode($re['body']); - else echo $re['body']; + echo $re['body']; } function main_handler($event, $context) @@ -50,5 +48,7 @@ function main_handler($event, $context) //echo '
'. json_encode($_COOKIE, JSON_PRETTY_PRINT).'
'; $path = GetPathSetting($event, $context); - return main($path); + $re = main($path); + if ($re['isBase64Encoded']) $re['body'] = base64_encode($re['body']); + return $re; }