title: move_upoaded_file():failed to open stream: permission denied laravel xampp
body: <p>I am having this error &quot;move_upoaded_file():failed to open stream: permission denied&quot; but not every time when a person uploads the file more than 2 to 3 times then this error appears. Here is my code for uploading the file</p>
  <pre><code>    $Editorfilepath = $ProjectPath . &quot;\\Editor\\&quot; . $WriterName . &quot;\\&quot; . $WriterUploadedDate . &quot;\\&quot; . $FileName;
  if(file_exists($Editorfilepath)) {
      unlink($Editorfilepath); //remove the previous file
  }
  move_uploaded_file($_FILES[&quot;delWorkingFile&quot;][&quot;tmp_name&quot;], $Editorfilepath);
  $DeliveryDirectoryPath = $ProjectPath . &quot;\\Delivery\\&quot; . $WriterName;
  </code></pre>