Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
王兴勇
/
helper-config
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
59c8a2df
authored
7 years ago
by
Lazy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正配置返回
parent
3fb40673
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
common.php
+4
-2
No files found.
common.php
100644 → 100755
View file @
59c8a2df
...
@@ -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
;
}
}
/**
/**
* 组装文件所在路径
* 组装文件所在路径
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment