add platform replit
parent
2e9ce0bbb4
commit
f909372a96
17
index.php
17
index.php
|
@ -39,6 +39,22 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
|
||||||
//echo 'path:'. $path;
|
//echo 'path:'. $path;
|
||||||
$_GET = getGET();
|
$_GET = getGET();
|
||||||
//echo '<pre>'. json_encode($_GET, JSON_PRETTY_PRINT).'</pre>';
|
//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']);
|
||||||
|
if ($re['isBase64Encoded']) echo base64_decode($re['body']);
|
||||||
|
else echo $re['body'];
|
||||||
|
} elseif (isset($_SERVER['DOCUMENT_ROOT'])&&substr($_SERVER['DOCUMENT_ROOT'], 0, 13)==='/home/runner/') {
|
||||||
|
include 'platform/Replit.php';
|
||||||
|
|
||||||
|
$path = getpath();
|
||||||
|
//echo 'path:'. $path;
|
||||||
|
$_GET = getGET();
|
||||||
|
//echo '<pre>'. json_encode($_GET, JSON_PRETTY_PRINT).'</pre>';
|
||||||
|
|
||||||
$re = main($path);
|
$re = main($path);
|
||||||
$sendHeaders = array();
|
$sendHeaders = array();
|
||||||
foreach ($re['headers'] as $headerName => $headerVal) {
|
foreach ($re['headers'] as $headerName => $headerVal) {
|
||||||
|
@ -56,7 +72,6 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
|
||||||
//echo 'path:'. $path;
|
//echo 'path:'. $path;
|
||||||
$_GET = getGET();
|
$_GET = getGET();
|
||||||
//echo '<pre>'. json_encode($_GET, JSON_PRETTY_PRINT).'</pre>';
|
//echo '<pre>'. json_encode($_GET, JSON_PRETTY_PRINT).'</pre>';
|
||||||
|
|
||||||
$re = main($path);
|
$re = main($path);
|
||||||
$sendHeaders = array();
|
$sendHeaders = array();
|
||||||
foreach ($re['headers'] as $headerName => $headerVal) {
|
foreach ($re['headers'] as $headerName => $headerVal) {
|
||||||
|
|
Loading…
Reference in New Issue