0
使用php獲取裁剪img src(使用ngImgCrop製作)更好的方法是什麼?ngImgCrop使用php獲取src
它給我帶回一個base64 IMG ..
的圖像是類似的東西:
<img ng-src="data:image/png;base64;................"/>
我tryed是這樣的:
function base64_to_jpeg($base64_string, $output_file) {
$ifp = fopen($output_file, "wb");
$data = explode(',', $base64_string);
fwrite($ifp, base64_decode($data[1]));
fclose($ifp);
return $output_file;
}