windows 下php上传文件问题
代码://创建文件夹if(!is_dir("./temp/")){mkdir("./temp/");@chmod("./temp/",777);}$location="....
代码:
//创建文件夹
if(! is_dir("./temp/"))
{
mkdir("./temp/");
@chmod("./temp/",777);
}
$location="./temp/";
if(is_uploaded_file($_FILES["pic"]["tmp_name"])){
if(move_uploaded_file($_FILES["pic"]["tmp_name"],$location.$_FILES["pic"] ["tmp_name"])){//69行
echo "上传成功";
}
else{
echo "上传失败";
}
}else{
echo "不是一个上传文件";
}
报错:Warning: move_uploaded_file(./temp/C:\Windows\Temp\phpF96D.tmp) [function.move-uploaded-file]: failed to open stream: Invalid argument in C:\AppServ\www\tea\uploads.php on line 69
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\phpF96D.tmp' to './temp/C:\Windows\Temp\phpF96D.tmp' in C:\AppServ\www\tea\uploads.php on line 69
上传失败 展开
//创建文件夹
if(! is_dir("./temp/"))
{
mkdir("./temp/");
@chmod("./temp/",777);
}
$location="./temp/";
if(is_uploaded_file($_FILES["pic"]["tmp_name"])){
if(move_uploaded_file($_FILES["pic"]["tmp_name"],$location.$_FILES["pic"] ["tmp_name"])){//69行
echo "上传成功";
}
else{
echo "上传失败";
}
}else{
echo "不是一个上传文件";
}
报错:Warning: move_uploaded_file(./temp/C:\Windows\Temp\phpF96D.tmp) [function.move-uploaded-file]: failed to open stream: Invalid argument in C:\AppServ\www\tea\uploads.php on line 69
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\phpF96D.tmp' to './temp/C:\Windows\Temp\phpF96D.tmp' in C:\AppServ\www\tea\uploads.php on line 69
上传失败 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询