Warning: move_uploaded_file(): The second argument to copy() function
<p>I'm working on a file upload method. But i suddenly start to get the following error, The only thing I changed was the file name. I reverted it back, but the error still persists.</p>

<p>Does anyone know how to solve this?</p>

<p>The error message is:</p>

<blockquote>
  <p>Warning: move_uploaded_file(): The second argument to copy()
  function cannot be a directory in
  /hermes/bosnaweb14a/b1717/ipg.plantationkeyartcorn/kittyrescuetnr/docs/upload.php
  on line 13</p>
  
  <p>Warning: move_uploaded_file(): Unable to move '/tmp/phpJki8OC' to '/' in
  /hermes/bosnaweb14a/b1717/ipg.plantationkeyartcorn/kittyrescuetnr/docs/upload.php
  on line 13
      Fail</p>
</blockquote>

<p>my php looks like this</p>

<pre><code>&lt;?php 
$file_upload="true";
$file_up_size=$_FILES['file_up'][size];
$file_destination=$REQUEST['file_type'];
$file_new_name=$REQUEST['file_name'];


$file_name=$_FILES[file_up][name];
**$add="$file_destination/$file_new_name"; // the path with the file name where the file will be stored**

if($file_upload=="true"){

if(move_uploaded_file ($_FILES[file_up][tmp_name], $add)){
echo print_r($file_new_name);
}else{echo "Fail";}

}else{
echo $msg;
}

 ?&gt;
</code></pre>