Update index.php

This commit is contained in:
qkqpttgf 2020-03-05 12:27:18 +08:00 committed by GitHub
parent 0a6e2be63e
commit 9f9d4e48f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -18,8 +18,7 @@ if ($_SERVER['USER']==='qcloud') {
header($headerName . ': ' . $headerVal, true); header($headerName . ': ' . $headerVal, true);
} }
http_response_code($re['statusCode']); http_response_code($re['statusCode']);
if ($re['isBase64Encoded']) echo base64_decode($re['body']); echo $re['body'];
else echo $re['body'];
} else { } else {
include 'function/normal.php'; include 'function/normal.php';
$path = getpath(); $path = getpath();
@ -33,8 +32,7 @@ if ($_SERVER['USER']==='qcloud') {
header($headerName . ': ' . $headerVal, true); header($headerName . ': ' . $headerVal, true);
} }
http_response_code($re['statusCode']); http_response_code($re['statusCode']);
if ($re['isBase64Encoded']) echo base64_decode($re['body']); echo $re['body'];
else echo $re['body'];
} }
function main_handler($event, $context) function main_handler($event, $context)
@ -50,5 +48,7 @@ function main_handler($event, $context)
//echo '<pre>'. json_encode($_COOKIE, JSON_PRETTY_PRINT).'</pre>'; //echo '<pre>'. json_encode($_COOKIE, JSON_PRETTY_PRINT).'</pre>';
$path = GetPathSetting($event, $context); $path = GetPathSetting($event, $context);
return main($path); $re = main($path);
if ($re['isBase64Encoded']) $re['body'] = base64_encode($re['body']);
return $re;
} }