Update index.php

pull/13/head
qkqpttgf 2020-01-18 00:31:58 +08:00 committed by GitHub
parent ba22154eda
commit 9223b97dee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,17 @@ if ($_SERVER['USER']==='qcloud') {
include 'function/scf.php'; include 'function/scf.php';
} elseif ($_SERVER['HEROKU_APP_DIR']==='/app') { } elseif ($_SERVER['HEROKU_APP_DIR']==='/app') {
include 'function/heroku.php'; include 'function/heroku.php';
$path = getpath();
//echo 'path:'. $path;
$_GET = getGET();
//echo '<pre>'. json_encode($_GET, JSON_PRETTY_PRINT).'</pre>';
$re = main($path);
$sendHeaders = array();
foreach ($re['headers'] as $headerName => $headerVal) {
header($headerName . ': ' . $headerVal, true);
}
http_response_code($re['statusCode']);
echo $re['body'];
} else { } else {
include 'function/normal.php'; include 'function/normal.php';
$path = getpath(); $path = getpath();