维护用户排序时间搜索

This commit is contained in:
wanyongkang
2020-11-24 14:57:04 +08:00
parent eb5c3c482f
commit 30c93507ff
2 changed files with 32 additions and 20 deletions

View File

@@ -139,19 +139,24 @@ class Fastphp
global $is_script;
$formal_origin = $this->config['formal_origin']; //跨域访问的时候才会存在此字段
$origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';
if (!in_array($origin, $formal_origin) && !$is_script) {
define('DB_HOST', $this->config['db']['host']);
define('DB_PORT', $this->config['db']['port']);
define('DB_NAME', $this->config['db']['dbname']);
define('DB_USER', $this->config['db']['username']);
define('DB_PASS', $this->config['db']['password']);
} else {
define('DB_HOST', $this->config['formal_db']['host']);
define('DB_PORT', $this->config['formal_db']['port']);
define('DB_NAME', $this->config['formal_db']['dbname']);
define('DB_USER', $this->config['formal_db']['username']);
define('DB_PASS', $this->config['formal_db']['password']);
}
// if (!in_array($origin, $formal_origin) && !$is_script) {
// define('DB_HOST', $this->config['db']['host']);
// define('DB_PORT', $this->config['db']['port']);
// define('DB_NAME', $this->config['db']['dbname']);
// define('DB_USER', $this->config['db']['username']);
// define('DB_PASS', $this->config['db']['password']);
// } else {
// define('DB_HOST', $this->config['formal_db']['host']);
// define('DB_PORT', $this->config['formal_db']['port']);
// define('DB_NAME', $this->config['formal_db']['dbname']);
// define('DB_USER', $this->config['formal_db']['username']);
// define('DB_PASS', $this->config['formal_db']['password']);
// }
define('DB_HOST', $this->config['db']['host']);
define('DB_PORT', $this->config['db']['port']);
define('DB_NAME', $this->config['db']['dbname']);
define('DB_USER', $this->config['db']['username']);
define('DB_PASS', $this->config['db']['password']);
}
//自动加载类