Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
7557dbc4
Commit
7557dbc4
authored
Jul 23, 2020
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code format
parent
47a74092
Pipeline
#10040
passed with stages
in 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
22 deletions
+1
-22
functions.php
app/Helpers/functions.php
+1
-22
No files found.
app/Helpers/functions.php
View file @
7557dbc4
...
...
@@ -85,27 +85,6 @@ function http_request_code($url, $isHearder = null, $post = 'GET', $data = null,
return
$result
;
}
//添加日志
function
addLog
(
$content
,
int
$level
=
0
)
{
$levelArr
=
[
'info'
,
'warn'
,
'error'
];
//准备数据
$data
=
[
'app'
=>
'center-cloud'
,
'content'
=>
$content
,
'level'
=>
$levelArr
[
$level
],
'create_time'
=>
date
(
'Y-m-d H:i:s'
,
time
())
];
$date
=
date
(
'Y-m-d'
);
$path
=
"/data/logs/center-cloud
{
$date
}
.json"
;
file_put_contents
(
$path
,
json_encode
(
$data
,
JSON_UNESCAPED_UNICODE
),
FILE_APPEND
);
}
/**
* 记录本地日志
* @param $content
...
...
@@ -138,7 +117,7 @@ function getIp()
$clientIP
=
$_SERVER
[
'REMOTE_ADDR'
];
}
addLog
(
$_SERVER
);
//
addLog($_SERVER);
return
$clientIP
;
}
...
...
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