Merge pull request #689 from qkqpttgf/FGtest

FG platform change server base
pull/690/head
qkqpttgf 2023-05-10 21:18:25 +08:00 committed by GitHub
commit bb7c865cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -1907,7 +1907,7 @@ output:
$canOneKeyUpate = 1; $canOneKeyUpate = 1;
} elseif (isset($_SERVER['BCE_CFC_RUNTIME_NAME'])&&$_SERVER['BCE_CFC_RUNTIME_NAME']=='php7') { } elseif (isset($_SERVER['BCE_CFC_RUNTIME_NAME'])&&$_SERVER['BCE_CFC_RUNTIME_NAME']=='php7') {
$canOneKeyUpate = 1; $canOneKeyUpate = 1;
} elseif (isset($_SERVER['_APP_SHARE_DIR'])&&$_SERVER['_APP_SHARE_DIR']==='/var/share/CFF/processrouter') { } elseif (isset($_SERVER['RUNTIME_LOG_PATH']) && $_SERVER['RUNTIME_LOG_PATH']=='/home/snuser/log') {
$canOneKeyUpate = 1; $canOneKeyUpate = 1;
} elseif (isset($_SERVER['DOCUMENT_ROOT'])&&$_SERVER['DOCUMENT_ROOT']==='/var/task/user') { } elseif (isset($_SERVER['DOCUMENT_ROOT'])&&$_SERVER['DOCUMENT_ROOT']==='/var/task/user') {
$canOneKeyUpate = 1; $canOneKeyUpate = 1;

View File

@ -13,7 +13,7 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
else include 'platform/TencentSCF_env.php'; else include 'platform/TencentSCF_env.php';
} elseif (isset($_SERVER['FC_FUNC_CODE_PATH'])) { } elseif (isset($_SERVER['FC_FUNC_CODE_PATH'])) {
include 'platform/AliyunFC.php'; include 'platform/AliyunFC.php';
} elseif (isset($_SERVER['_APP_SHARE_DIR']) && $_SERVER['_APP_SHARE_DIR']=='/var/share/CFF/processrouter') { } elseif (isset($_SERVER['RUNTIME_LOG_PATH']) && $_SERVER['RUNTIME_LOG_PATH']=='/home/snuser/log') {
//if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/HuaweiFG_file.php'; //if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/HuaweiFG_file.php';
//else include 'platform/HuaweiFG_env.php'; //else include 'platform/HuaweiFG_env.php';
echo 'FG' . PHP_EOL; echo 'FG' . PHP_EOL;
@ -134,7 +134,7 @@ function handler($event, $context)
return new RingCentral\Psr7\Response($re['statusCode'], $re['headers'], ($re['isBase64Encoded']?base64_decode($re['body']):$re['body'])); return new RingCentral\Psr7\Response($re['statusCode'], $re['headers'], ($re['isBase64Encoded']?base64_decode($re['body']):$re['body']));
} elseif ($_SERVER['_APP_SHARE_DIR']=='/var/share/CFF/processrouter') { } elseif (isset($_SERVER['RUNTIME_LOG_PATH']) && $_SERVER['RUNTIME_LOG_PATH']=='/home/snuser/log') {
// Huawei FG // Huawei FG
global $contextUserData; global $contextUserData;
$contextUserData = $context; $contextUserData = $context;

View File

@ -6,7 +6,7 @@ global $contextUserData;
function printInput($event, $context) function printInput($event, $context)
{ {
$tmp['eventID'] = $context->geteventID(); $tmp['RequestID'] = $context->getRequestID();
$tmp['RemainingTimeInMilliSeconds'] = $context->getRemainingTimeInMilliSeconds(); $tmp['RemainingTimeInMilliSeconds'] = $context->getRemainingTimeInMilliSeconds();
$tmp['AccessKey'] = $context->getAccessKey(); $tmp['AccessKey'] = $context->getAccessKey();
$tmp['SecretKey'] = $context->getSecretKey(); $tmp['SecretKey'] = $context->getSecretKey();
@ -17,7 +17,7 @@ function printInput($event, $context)
$tmp['MemorySize'] = $context->getMemorySize(); $tmp['MemorySize'] = $context->getMemorySize();
$tmp['CPUNumber'] = $context->getCPUNumber(); $tmp['CPUNumber'] = $context->getCPUNumber();
$tmp['ProjectID'] = $context->getProjectID(); $tmp['ProjectID'] = $context->getProjectID();
$tmp['Package'] = $context->Package(); $tmp['Package'] = $context->getPackage();
$tmp['Token'] = $context->getToken(); $tmp['Token'] = $context->getToken();
$tmp['Logger'] = $context->getLogger(); $tmp['Logger'] = $context->getLogger();
@ -75,7 +75,7 @@ function GetPathSetting($event, $context)
$_SERVER['HTTP_TRANSLATE'] = $event['headers']['translate'];//'f' $_SERVER['HTTP_TRANSLATE'] = $event['headers']['translate'];//'f'
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = $event['headers']['if-modified-since']; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = $event['headers']['if-modified-since'];
$_SERVER['REQUEST_METHOD'] = $event['httpMethod']; $_SERVER['REQUEST_METHOD'] = $event['httpMethod'];
$_SERVER['_APP_SHARE_DIR'] = '/var/share/CFF/processrouter'; $_SERVER['RUNTIME_LOG_PATH'] = '/home/snuser/log';
return $path; return $path;
} }

View File

@ -6,7 +6,7 @@ global $contextUserData;
function printInput($event, $context) function printInput($event, $context)
{ {
$tmp['eventID'] = $context->geteventID(); $tmp['RequestID'] = $context->getRequestID();
$tmp['RemainingTimeInMilliSeconds'] = $context->getRemainingTimeInMilliSeconds(); $tmp['RemainingTimeInMilliSeconds'] = $context->getRemainingTimeInMilliSeconds();
$tmp['AccessKey'] = $context->getAccessKey(); $tmp['AccessKey'] = $context->getAccessKey();
$tmp['SecretKey'] = $context->getSecretKey(); $tmp['SecretKey'] = $context->getSecretKey();
@ -17,7 +17,7 @@ function printInput($event, $context)
$tmp['MemorySize'] = $context->getMemorySize(); $tmp['MemorySize'] = $context->getMemorySize();
$tmp['CPUNumber'] = $context->getCPUNumber(); $tmp['CPUNumber'] = $context->getCPUNumber();
$tmp['ProjectID'] = $context->getProjectID(); $tmp['ProjectID'] = $context->getProjectID();
$tmp['Package'] = $context->Package(); $tmp['Package'] = $context->getPackage();
$tmp['Token'] = $context->getToken(); $tmp['Token'] = $context->getToken();
$tmp['Logger'] = $context->getLogger(); $tmp['Logger'] = $context->getLogger();
@ -75,7 +75,7 @@ function GetPathSetting($event, $context)
$_SERVER['HTTP_TRANSLATE'] = $event['headers']['translate'];//'f' $_SERVER['HTTP_TRANSLATE'] = $event['headers']['translate'];//'f'
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = $event['headers']['if-modified-since']; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = $event['headers']['if-modified-since'];
$_SERVER['REQUEST_METHOD'] = $event['httpMethod']; $_SERVER['REQUEST_METHOD'] = $event['httpMethod'];
$_SERVER['_APP_SHARE_DIR'] = '/var/share/CFF/processrouter'; $_SERVER['RUNTIME_LOG_PATH'] = '/home/snuser/log';
return $path; return $path;
} }