2
我使用PHP和JSON上傳多張圖片 的文件夾中,並在數據庫中移動創建一個Web服務,我可以使用此代碼多圖片上傳
$image_binary=base64_decode($real_img);
$image_file = fopen("images/real/".time().$real_img.$id.'.jpg', 'wb');
fwrite($image_file, $image_binary);
$image_path = "".$id.'.jpg';
move_uploaded_file(fwrite($image_file, $image_binary), $image_path);
上傳一張圖片
如何獲取數組中的多個圖像,如何將此代碼用於多個圖像。
什麼是 「ID」?什麼是'$ real_image'?解釋更多。 –
$ real_image是我得到的圖像的變量。 –