Commit 59c8a2df by Lazy

修正配置返回

parent 3fb40673
...@@ -22,7 +22,8 @@ function faker_login($configs) { ...@@ -22,7 +22,8 @@ function faker_login($configs) {
function require_db_config($config) { function require_db_config($config) {
$file = format_common_path('db.'.$config); $file = format_common_path('db.'.$config);
file_exists($file) || $file = format_common_path('db.local'); file_exists($file) || $file = format_common_path('db.local');
return $file; $config = require $file;
return $config;
} }
/** /**
* 模拟登陆admin后台 * 模拟登陆admin后台
...@@ -39,7 +40,8 @@ function faker_admin($file) { ...@@ -39,7 +40,8 @@ function faker_admin($file) {
*/ */
function faker_member($file) { function faker_member($file) {
$TIMESTAMP = $_SERVER['REQUEST_TIME']; $TIMESTAMP = $_SERVER['REQUEST_TIME'];
$_SESSION = require format_common_path($file); $user_info = require format_common_path($file);
$_SESSION = $user_info;
} }
/** /**
* 组装文件所在路径 * 组装文件所在路径
......
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 sign in to comment