【发布时间】:2021-05-21 03:47:20
【问题描述】:
我遇到此错误“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;
【问题讨论】:
-
您应该更改权限目录并将其设置为777,
-
哪个目录?保存文件的应用程序目录或文件目录?
标签: php laravel xampp windows-7