我改变了打印错误信息命令的位置,放在最后了。命令如下: echo "<br/>"; print_r($_FILES); echo "<br/>"; echo mysqli_error($conn); echo "<br/>";打印出来的全部信息是:failed! Array ( [file] => Array ( [name] => photo.jpg [type] => image/jpeg [tmp_name] => C:\Windows\Temp\phpA968.tmp [error] => 0 [size] => 76201 ) ) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' .)10.)-,3:J>36F7,-@WAFLNRSR2>ZaZP`JQROÿÛ' at line 1还有,我上传的是大文件,echo $sql显示出来是很长的内容,这里就不显示了。 貌似insert into onlytest.file (contents,type,name,size) values ('$file_data','$file_type','$file_name',$file_size) 这句话有错?
另外,echo mysqli_error($conn); 有错误没有
看起来也没有错啊。
咋回事情呢?
出来的结果是:
没有其他出错信息(我的浏览器的出错信息显示是正常的)。这个又是咋回事情呢?
echo "<br/>";
print_r($_FILES);
echo "<br/>";
echo mysqli_error($conn);
echo "<br/>";打印出来的全部信息是:failed!
Array ( [file] => Array ( [name] => photo.jpg [type] => image/jpeg [tmp_name] => C:\Windows\Temp\phpA968.tmp [error] => 0 [size] => 76201 ) )
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' .)10.)-,3:J>36F7,-@WAFLNRSR2>ZaZP`JQROÿÛ' at line 1还有,我上传的是大文件,echo $sql显示出来是很长的内容,这里就不显示了。
貌似insert into onlytest.file (contents,type,name,size) values ('$file_data','$file_type','$file_name',$file_size)
这句话有错?
print_r($_FILES);
echo "<br/>";
echo mysqli_error($conn);
echo "<br/>";
echo $sql;
mysqli_close ( $conn );错误信息: