Php Laravel 5.2-Intervation图像,保存base64输入图像
我将图像base64传递给我的控制器输入,我使用intervation图像调整大小,使用画布,保存图像。但我在解码image base64时遇到一些问题: PostController.php第163行中的ErrorException:base64_decode()应为 参数1为字符串,数组给定 退回这个: 使用Php Laravel 5.2-Intervation图像,保存base64输入图像,php,laravel,base64,Php,Laravel,Base64,我将图像base64传递给我的控制器输入,我使用intervation图像调整大小,使用画布,保存图像。但我在解码image base64时遇到一些问题: PostController.php第163行中的ErrorException:base64_decode()应为 参数1为字符串,数组给定 退回这个: 使用 foreach($image_array as $key => $image) { $file = base64_decode($image); 错误发生的原因是在fo
foreach($image_array as $key => $image) {
$file = base64_decode($image);
错误发生的原因是在for
循环中您使用的是数值,但$image\u数组
具有非数值索引。第一个索引不是0
,而是dsdas.PNG
$image_array = $request->input('image');
return dd($image_array[1]);
foreach($image_array as $key => $image) {
$file = base64_decode($image);