PHP错误,不能往数据库里插入图片

我是php新手,我尝试将数据插入到我的数据库中,很奇怪,name/price字段可以插入成功,但我插入图片(LONGBLOB)没有成功,代码如下所示:

setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 
if(isset($_POST['update']))
{
$name = $_POST['name'];
$image = $_FILES['image'];
$price = $_POST['price'];
$statement = $conn->prepare('INSERT INTO tbl_product (name, image, price)
    VALUES (:name, :image, :price)');   
$statement->execute([
    ':name' => $name,
    ':image' => $image,
    ':price' => $price,
]);
}
?>

Name

Image

Select image to upload:

Price

';?>

?

2个回答