这究竟是为什么呀???
Warning: copy(C:\WINDOWS\Temp) [function.copy]: failed to open stream: Permission denied in C:\Program Files\Apache Group\Apache2\htdocs\simple_upload.php on line 18
文件上传失败.
-------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文件上传</title>
</head>
<body>
<table>
<form enctype="multipart/form-data" name="myform" method="post">
<tr><td>文件上传</td ><td><input name="myfile" type="file"></td></tr>
<tr><td colspan="2"><input name="submit" value="上传" type="submit">
</form>
<?php
if(isset($submit)){
if($myfile != "none"){
$upload_dir="C:\WINDOWS\Temp";
$up=copy($myfile,$upload_dir);
if($up==1){
print("文件上传成功!");
}
else{
print("文件上传失败.");
}
unlink($myfile);
}
else{
print("你没有上传任何文件");
}
}
?>
</td></tr>
</table>
</body>
</html>
Warning: copy(C:\WINDOWS\Temp) [function.copy]: failed to open stream: Permission denied in C:\Program Files\Apache Group\Apache2\htdocs\simple_upload.php on line 18
文件上传失败.
-------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文件上传</title>
</head>
<body>
<table>
<form enctype="multipart/form-data" name="myform" method="post">
<tr><td>文件上传</td ><td><input name="myfile" type="file"></td></tr>
<tr><td colspan="2"><input name="submit" value="上传" type="submit">
</form>
<?php
if(isset($submit)){
if($myfile != "none"){
$upload_dir="C:\WINDOWS\Temp";
$up=copy($myfile,$upload_dir);
if($up==1){
print("文件上传成功!");
}
else{
print("文件上传失败.");
}
unlink($myfile);
}
else{
print("你没有上传任何文件");
}
}
?>
</td></tr>
</table>
</body>
</html>