base64图片格式:$base64_url = data:image/jpeg;base64,xxxxxxxxxxxxxxxxxxxxxx
1,去除头部:$base64_body = substr(strstr($base64_url,','),1);
2,解码:$data= base64_decode($base64_body );
3,存储or创建图片:
file_put_contents($file_path,$data);
或$image = imagecreatefromstring($data);