Commit 90eb374c authored by tufengqi's avatar tufengqi

优化ENV逻辑

parent 288fe6f6
<?php
$env = include(__DIR__.'/Env.php');
$env = include(__DIR__ . '/Env.php');
$env = trim($env);
defined('SERVICE_ENV') || define('SERVICE_ENV', $env);
defined('SERVICE_FORCE_VERSION_KEY') || define('SERVICE_FORCE_VERSION_KEY', 'thrift_impl_version');
......@@ -100,7 +100,7 @@ defined('APP_FOLDER') || define('APP_FOLDER', 'application');
// swoole程序中每次访问可能根据用户请求带的版本号有所不同
$GLOBALS['GLOBAL_VERSION_VALUE'] = $version_val;
$GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'] = $version_val_no_prefix;
if (file_exists($base_path . 'vendor/yii2_33cn_dev/')) {
if ((SERVICE_ENV === 'test' || !SERVICE_ENV) && file_exists($base_path . 'vendor/yii2_33cn_dev/')) {
$GLOBALS['GLOBAL_YII_SYSTEM_APP'] = $base_path . 'vendor/yii2_33cn_dev/';
} else {
$GLOBALS['GLOBAL_YII_SYSTEM_APP'] = $base_path . 'vendor/yii2_33cn/';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment