您好我是PHP的新手,我正在尝试上传3张图片,但我收到了错误消息 请不要降级我,我只是在学习并尝试制作一个简单的系统。谢谢
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\epushmoyan\customer\connect.php on line 17
这是我的代码:
function addpost($a,$b,$c,$d,$name,$type,$size,$tmp_name,$error,$name1,$type1,$size1,$tmp_name1,$error1,$name2,$type2,$size2,$tmp_name2,$error2,$e)
{
$img = 'thumbnails/products/'.$name.$name1.$name2
mysql_query("INSERT post(p_name,p_contact,p_email,image,image1,image2,p_address,dateadded) values ('$a','$b','$c','$d','$img','$e',NOW())");
if ($error > 0)
{
die("Error uploading file! Code $error.");
}
else
{
if($size> 10000000000) //conditions for the file
{
die("Format is not allowed or file size is too big!");
}
else
{
move_uploaded_file($tmp_name,$tmp_name1,$tmp_name2,"thumbnails/products/".$name.$name1,$name2);
}
}
答案 0 :(得分:0)
失踪;在
$img = 'thumbnails/products/'.$name.$name1.$name2
答案 1 :(得分:0)
缺少;
:
$img = 'thumbnails/products/'.$name.$name1.$name2
^--- here
mysql_query
投票结束,因为这是一个简单的错字。