【发布时间】:2021-05-23 01:32:50
【问题描述】:
在转换 blob 格式的图像时出现格式错误且 mysql 不允许打开出现错误不是有效格式。
$filePath = $targetDir."/".$_FILES['productimage']["name"];
$photopath1 = $_FILES['productimage']["name"];
$blobImg=addslashes(file_get_contents($_FILES['productimage']["tmp_name"]));
if(!move_uploaded_file($_FILES['productimage']["tmp_name"], $filePath)){
return false;
}
【问题讨论】: