Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nacos-config
Project
Project
Details
Activity
Releases
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
Euan游根明
nacos-config
Commits
abb5d4a9
Commit
abb5d4a9
authored
Dec 01, 2023
by
Euan游根明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 设置时区
parent
b3e320c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
Nacos.php
src/Nacos/Nacos.php
+9
-6
No files found.
src/Nacos/Nacos.php
View file @
abb5d4a9
...
...
@@ -13,6 +13,7 @@ class Nacos
if
(
empty
(
$res
)){
return
;
}
date_default_timezone_set
(
'Asia/Shanghai'
);
self
::
info
(
'开始拉取配置文件:'
.
date
(
'Y-m-d H:i:s'
));
$url
=
self
::
$configs
[
'NACOS_URL'
]
??
''
;
$group
=
self
::
$configs
[
'GROUP'
]
??
''
;
...
...
@@ -259,13 +260,15 @@ class Nacos
*/
public
static
function
getPath
(
$path
,
$fileName
){
$file
=
$path
.
$fileName
;
if
(
!
file_exists
(
$file
))
{
mkdir
(
$path
,
0775
,
true
);
touch
(
$file
);
chmod
(
$file
,
0775
);
$filePath
=
$path
.
$fileName
;
if
(
!
file_exists
(
$filePath
))
{
if
(
!
file_exists
(
$path
))
{
mkdir
(
$path
,
0775
,
true
);
}
touch
(
$filePath
);
chmod
(
$filePath
,
0775
);
}
return
$file
;
return
$file
Path
;
}
/**
...
...
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