维护用户排序时间搜索

This commit is contained in:
wanyongkang
2020-11-24 14:59:17 +08:00
parent 30c93507ff
commit 4736fdd979

View File

@@ -139,24 +139,19 @@ 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']);
// }
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']);
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']);
}
}
//自动加载类