$image = new \Think\Image();
$bgm=’./Public/haibao.png’; //背景图
p
o
s
t
e
r
=
"
.
/
P
u
b
l
i
c
/
p
o
s
t
e
r
/
poster="./Public/poster/
poster="./Public/poster/gid.jpg"; //商品水印图位置
i
m
g
=
e
x
p
l
o
d
e
(
′
/
′
,
img=explode('/',
img=explode(′/′,list[‘image’]);
KaTeX parse error: Expected '}', got 'EOF' at end of input: …t/bzl/Uploads/{img[‘4’]}/{$img[‘5’]}";
b
a
o
c
u
n
=
"
.
/
P
u
b
l
i
c
/
t
h
u
m
b
n
a
i
l
/
baocun="./Public/thumbnail/
baocun="./Public/thumbnail/gid.jpg";//商品缩略图位置
i
m
a
g
e
−
>
o
p
e
n
(
image->open(
image−>open(goods)->thumb(460, 460,\Think\Image::IMAGE_THUMB_CENTER)->save(
b
a
o
c
u
n
)
;
/
/
商
品
缩
略
图
/
/
baocun); //商品缩略图 //
baocun);//商品缩略图//image->open(
b
g
m
)
−
>
w
a
t
e
r
(
bgm)->water(
bgm)−>water(thumb,\Think\Image::IMAGE_WATER_NORTH,100)->save($poster);
i
m
a
g
e
−
>
o
p
e
n
(
image->open(
image−>open(bgm)->water(KaTeX parse error: Expected 'EOF', got '\Think' at position 8: baocun,\̲T̲h̲i̲n̲k̲\Image::IMAGE_W…poster);//商品添加到背景图水印
q
r
c
o
d
e
=
qrcode=
qrcode=this->shopqrcode($_GET[‘uid’]);
q
r
=
e
x
p
l
o
d
e
(
′
/
′
,
qr=explode('/',
qr=explode(′/′,qrcode);
//
q
r
=
s
t
r
r
i
p
o
s
(
qr=strripos(
qr=strripos(qrcode,’/’);
e
n
d
=
e
n
d
(
end = end(
end=end(qr);
//
q
r
c
o
d
e
i
m
g
=
"
/
m
n
t
/
d
a
t
a
/
w
w
w
r
o
o
t
/
b
z
l
/
Q
r
c
o
d
e
/
w
a
t
e
r
m
a
r
k
/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/watermark/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/watermark/end";
//
q
r
c
o
d
e
i
m
g
=
"
/
m
n
t
/
d
a
t
a
/
w
w
w
r
o
o
t
/
b
z
l
/
Q
r
c
o
d
e
/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/uid.png"; //二维码
q
r
c
o
d
e
i
m
g
=
"
/
m
n
t
/
d
a
t
a
/
w
w
w
r
o
o
t
/
b
z
l
/
Q
r
c
o
d
e
/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/
qrcodeimg="/mnt/data/wwwroot/bzl/Qrcode/end";
//
q
r
c
o
d
e
i
m
g
=
"
h
t
t
p
s
:
/
/
"
.
qrcodeimg="https://".
qrcodeimg="https://"._SERVER[SERVER_NAME]."/Qrcode/$id".".png";//返回二维码
s
u
l
v
t
u
=
"
.
/
P
u
b
l
i
c
/
t
h
u
m
b
n
a
i
l
/
c
o
d
e
−
"
.
"
sulvtu="./Public/thumbnail/code-"."
sulvtu="./Public/thumbnail/code−"."gid.jpg";//商品缩略图位置
i
m
a
g
e
−
>
o
p
e
n
(
image->open(
image−>open(qrcodeimg)->thumb(200, 200,\Think\Image::IMAGE_THUMB_CENTER)->save($sulvtu); //商品缩略图
c
o
d
e
=
"
.
/
P
u
b
l
i
c
/
c
o
d
e
/
code="./Public/code/
code="./Public/code/gid.png"; //二维码水印
$wz=array(130,535);//二维码水印位置
i
m
a
g
e
−
>
o
p
e
n
(
image->open(
image−>open(poster)->water(
s
u
l
v
t
u
,
sulvtu,
sulvtu,wz,100)->save($code);//二维码添加到背景图水印
$fonts="./msyh.ttf";
i
m
g
=
"
.
/
P
u
b
l
i
c
/
i
m
g
/
img="./Public/img/
img="./Public/img/type.$gid.jpg";//最终的海报
$prceiwz=array(30,485);//价格水印位置
$titlewz=array(20,510);//价格水印位置
r
e
s
=
res=
res=image->open(
c
o
d
e
)
−
>
t
e
x
t
(
code)->text(
code)−>text(list[‘title’],KaTeX parse error: Expected 'EOF', got '#' at position 11: fonts,12,'#̲000000',titlewz,0,0)->text(
l
i
s
t
[
′
p
r
i
c
e
′
]
,
list['price'],
list[′price′],fonts,14,’#FF0000’,
p
r
c
e
i
w
z
,
0
,
0
)
−
>
s
a
v
e
(
prceiwz,0,0)->save(
prceiwz,0,0)−>save(img);