Evertime網頁加載完畢後,我得到XAMPP爲什麼是我的其他錯誤?
解析錯誤:語法錯誤,意外 ')' 在C:\ XAMPP \ htdocs中\ ZeroWebsite \ uploadtest.php第19行
<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>
I基金本指南在YouTube上我只想讓它工作plzz告訴我該怎麼做
感謝您的幫助,但我的圖像沒有顯示在我的屏幕上你知道爲什麼嗎? –