每次我加载我得到的页面
解析错误:语法错误,第 19 行 C:\xampp\htdocs\ZeroWebsite\uploadtest.php 中的意外 ')'
<html>
<head>
<title></title>
</head>
<body>
<form action="uploadtest.php" method="POST" enctype="multipart/form-data">
<input type="file" name="image"> <input type="submit" value="Upload">
</form>
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("dataimage") or die (mysql_error());
$file = $_FILES['image']['tmp_name']);
if (!isset($file))
echo "select an image";
else // this is my line 19
{
$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name = addslashes($_FILES['image']['name']);
$image_size = getimagesize($_FILES['image']['tmp_name']);
if ($image_size==FALSE)
echo "not a image.";
else
{
if (!$insert = mysql_query("INSERT INTO myimage VALUES ('','@image_name','$image')"))
echo "problem uploading image.";
else
{
$lastid = mysql_insert_id();
echo "image uploaded.<p /> Your image:<p />img src=uploadtest2.php?id=lastid>";
}
}
}?>
</body>
</html>
我在 youtube 上资助这个指南我只是想让它工作请告诉我该怎么做