$img_data
=
str_replace
(
'data:image/'
.
$img_type
';base64,'
,
''
);
//替换开头的格式标记'data:image/jpeg;base64,'
= base64_ decode(
file_put_ contents(
$path_name