求教下php上传文件的移动,为什么会报错呢
if(move_uploaded_file($file['tmp_name'],'./'.$name)){echo'上传成功';}else{echo'上传失败';}报错如...
if(move_uploaded_file($file['tmp_name'], './'.$name)){
echo '上传成功';
}else{
echo '上传失败';
}
报错如下
Warning: move_uploaded_file(../2017/06/05-908.png): failed to open stream: No such file or directory in C:\Users\hua\Desktop\host\index1.php on line 65
Warning: move_uploaded_file(): Unable to move 'C:\Windows\Temp\phpF968.tmp' to '../2017/06/05-908.png' in C:\Users\hua\Desktop\host\index1.php on line 65
上传失败 展开
echo '上传成功';
}else{
echo '上传失败';
}
报错如下
Warning: move_uploaded_file(../2017/06/05-908.png): failed to open stream: No such file or directory in C:\Users\hua\Desktop\host\index1.php on line 65
Warning: move_uploaded_file(): Unable to move 'C:\Windows\Temp\phpF968.tmp' to '../2017/06/05-908.png' in C:\Users\hua\Desktop\host\index1.php on line 65
上传失败 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询