<?php
include "config.php";
$StyleName = $_POST['StyleName'];
$Description = $_POST['Desc'];
$image = $_FILES['image']['name'];
$sql = "INSERT INTO viewcutlist (CutName,Description,Image)
VALUES ('$StyleName','$Description','$image')";
if ($conn->query($sql) == TRUE) {
echo "New record created successfully";
}
?>
我选择的图像高于500kb但插入的图像被破坏并将其大小减小为字节。
答案 0 :(得分:0)
def
而不是使用$image=addslashes (file_get_contents($_FILES['image']['tmp_name']));
并添加斜杠。