FG:select save in env or file
parent
3619a611a7
commit
268c6e8be7
|
@ -11,7 +11,9 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
|
||||||
} elseif (isset($_SERVER['FC_SERVER_PATH'])&&$_SERVER['FC_SERVER_PATH']==='/var/fc/runtime/php7.2') {
|
} elseif (isset($_SERVER['FC_SERVER_PATH'])&&$_SERVER['FC_SERVER_PATH']==='/var/fc/runtime/php7.2') {
|
||||||
include 'platform/AliyunFC.php';
|
include 'platform/AliyunFC.php';
|
||||||
} elseif ($_SERVER['_APP_SHARE_DIR']=='/var/share/CFF/processrouter') {
|
} elseif ($_SERVER['_APP_SHARE_DIR']=='/var/share/CFF/processrouter') {
|
||||||
include 'platform/HuaweiFG.php';
|
//if (getenv('ONEMANAGER_CONFIG_SAVE')=='file') include 'platform/HuaweiFG_file.php';
|
||||||
|
//else include 'platform/HuaweiFG_env.php';
|
||||||
|
echo 'FG' . PHP_EOL;
|
||||||
} elseif (isset($_SERVER['HEROKU_APP_DIR'])&&$_SERVER['HEROKU_APP_DIR']==='/app') {
|
} elseif (isset($_SERVER['HEROKU_APP_DIR'])&&$_SERVER['HEROKU_APP_DIR']==='/app') {
|
||||||
include 'platform/Heroku.php';
|
include 'platform/Heroku.php';
|
||||||
$path = getpath();
|
$path = getpath();
|
||||||
|
@ -91,6 +93,9 @@ function handler($event, $context)
|
||||||
// Huawei FG
|
// Huawei FG
|
||||||
global $contextUserData;
|
global $contextUserData;
|
||||||
$contextUserData = $context;
|
$contextUserData = $context;
|
||||||
|
if ($context->getUserData('ONEMANAGER_CONFIG_SAVE')=='file') include_once 'platform/HuaweiFG_file.php';
|
||||||
|
else include_once 'platform/HuaweiFG_env.php';
|
||||||
|
|
||||||
$event = json_decode(json_encode($event), true);
|
$event = json_decode(json_encode($event), true);
|
||||||
if ($event['isBase64Encoded']) $event['body'] = base64_decode($event['body']);
|
if ($event['isBase64Encoded']) $event['body'] = base64_decode($event['body']);
|
||||||
|
|
||||||
|
@ -104,6 +109,7 @@ function handler($event, $context)
|
||||||
$path = GetPathSetting($event, $context);
|
$path = GetPathSetting($event, $context);
|
||||||
|
|
||||||
return main($path);
|
return main($path);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue