服务器端php获取图片数据流
程序员文章站
2022-06-12 14:07:17
...
1));die;}$file = time().'.'.$ext;$data = preg_replace("/data:image\/(.*);base64,/","",$data);if (file_put_contents($file,base64_decode($data))===false) {echo json_encode(array("error"=>1));}else{echo json_encode(array("error"=>0));}