我遇到此错误“move_upoaded_file():failed to open stream: permission denied”,但并非每次当有人上传文件超过 2 到 3 次时都会出现此错误。这是我上传文件的代码
$Editorfilepath = $ProjectPath . "\\Editor\\" . $WriterName . "\\" . $WriterUploadedDate . "\\" . $FileName;
if(file_exists($Editorfilepath)) {
unlink($Editorfilepath); //remove the previous file
}
move_uploaded_file($_FILES["delWorkingFile"]["tmp_name"], $Editorfilepath);
$DeliveryDirectoryPath = $ProjectPath . "\\Delivery\\" . $WriterName;
答案 0 :(得分:0)
更改权限
sudo chmod 777 路径文件夹