文件上传出错,急~~~请高手帮我看看是什么原因
我写的代码如下:data---->是longblob
<?
session_start();
require"../check2.php";
require"../config.php";
?>
<html>
<head>
<title>文件上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<?
if($submit)
{
$connect=mysql_connect($host,$root,$pas);
mysql_select_db($db);
$data=addslashes(fread(fopen($file,"r"),filesize($file)));
$result=mysql_query("insert into $pic(description,data,filename,filesize,filetype) values ('$description','$data','$file_name','$file_size','$file_type')");
$id=mysql_insert_id();
echo "<p>文件已经上传至数据库,其ID为<b>$id<b>";
mysql_close($connect);
}
else
{
//echo"您的操作有误!<meta http-equiv=refresh content=1;url=update.php>";exit;
}
?>
<form name="form1" enctype="multipart/form-data" method="post" action="">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C6DCEC">
<tr bgcolor="#007EBB">
<td height="25" colspan="2"><div align="center"><strong><font color="#FFFF00">文
件 上 传 界 面</font></strong></div></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="91"><div align="right"><font size="2">图片描述:</font></div></td>
<td width="67%"> <textarea name="description" cols="40" rows="5"></textarea></td>
</tr>
<tr bgcolor="#F0F0F0">
<td height="28"><div align="right"><font size="2">文件浏览:</font></div></td>
<td><input type="file" name="file"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td height="43" colspan="2"><div align="center">
<input type="submit" name="submit" value="上传文件">
<input type="hidden" name="MAX_FILE_SIZE" values="240000000></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="38" colspan="2">
<input type="reset" name="Submit2" value="全部重置">
</div></td>
</tr>
</table>
</form>
</body>
</html>
当我运行时就会出现下面的错误:
Warning: stat failed for C:\WINNT\TEMP\php132.tmp (errno=2 - No such file or directory) in D:\web\web.xiang3.com\cbg\biscuit\emp\update.php on line 18
请问是为什么呢?