php将图片保存base64
$path = 'myfolder/myimage.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
本文来自投稿,不代表本站立场,如若转载,请注明出处:https://www.unfit.cn/archives/60.html