Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
without authentication
meibuyu-micro
Commits
14e7c9fd
Commit
14e7c9fd
authored
Dec 02, 2020
by
fuyunnan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into test
parents
34eebd2e
f381fbb1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Drawer.php
src/Tools/Drawer.php
+3
-2
No files found.
src/Tools/Drawer.php
View file @
14e7c9fd
...
@@ -107,8 +107,9 @@ class Drawer
...
@@ -107,8 +107,9 @@ class Drawer
*/
*/
public
function
downLoadImgWebpChannel
(
$url
,
$path
=
''
)
public
function
downLoadImgWebpChannel
(
$url
,
$path
=
''
)
{
{
$originUrl
=
$url
;
//如果shopify 去掉版本号
//如果shopify 去掉版本号
if
(
strpos
(
$url
,
'
cdn.shopify.com
'
)
!==
false
)
{
if
(
strpos
(
$url
,
'
shopify
'
)
!==
false
)
{
$url
=
substr
(
$url
,
0
,
strpos
(
$url
,
'?v='
));
$url
=
substr
(
$url
,
0
,
strpos
(
$url
,
'?v='
));
}
}
$savePath
=
$this
->
rootPath
.
'/download/images/'
.
(
$path
?
$path
.
'/'
:
$this
->
savePath
);
$savePath
=
$this
->
rootPath
.
'/download/images/'
.
(
$path
?
$path
.
'/'
:
$this
->
savePath
);
...
@@ -120,7 +121,7 @@ class Drawer
...
@@ -120,7 +121,7 @@ class Drawer
$filePath
=
$savePath
.
"
$filename
.
$ext
"
;
$filePath
=
$savePath
.
"
$filename
.
$ext
"
;
$ch
=
curl_init
();
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
// 信任任何证书
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
// 信任任何证书
curl_setopt
(
$ch
,
CURLOPT_URL
,
$
u
rl
);
curl_setopt
(
$ch
,
CURLOPT_URL
,
$
originU
rl
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_CONNECTTIMEOUT
,
30
);
curl_setopt
(
$ch
,
CURLOPT_CONNECTTIMEOUT
,
30
);
$file
=
curl_exec
(
$ch
);
$file
=
curl_exec
(
$ch
);
...
...
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