|
关于上传文件出错:
<html>
<head>
<title>文件上传</title>
</head>
<body>
<br><br><br><center>
<form enctype="multipart/form-date" action="upload.php" method="post">请选择文件:<input name="userfile" type="file"><br>
<input type="submit" value="开始上传">
</form></center>
</body>
</html>
上面的html文件上传处理对应下面upload.php
<?php
copy($userfile, "userfile_name");
echo "filename: ",$userfile_name,"<br>";
echo "filesize: ",$userfile_size,"<br>";
echo "filetype: ",$userfile_type;
?>
出错信息为:
Warning: copy(C:\\Command.com): failed to open stream: No such file or directory in /usr/local/apache/htdocs/php2/upload.php on line 2
filename:
filesize:
filetype:
请高手指点. |
|