title: FTP file upload successefully but not showing on server
body: <p><strong>Just a brief introduction / background info:</strong> </p>
  
  <p>this can be seen as <a href="https://stackoverflow.com/questions/32389616/error-upon-uploading-image-no-such-path-or-directory">part 2 of my question from yesterday</a> where @Fred-ii was very helpful. I have managed to rectify the file path errors etc.</p>
  
  <p><strong>My Problem</strong> </p>
  
  <p>As stated above I am successfully uploading file to server (or at least getting success message) but when I check for the file in the folder it is not there..? In fact I have fine combed the whole server for the uploaded file but not seeing uploaded file.</p>
  
  <p>All files have proper permissions, is there anything that can cause this problem except for file permissions?</p>
  
  <p>Perhaps something I have to change in php.ini...but then again I would not have received upload success message..? </p>
  
  <p>Has this ever happened to anyone in the past? </p>
  
  <pre><code>$file_upload="true";
  $file_up_size=$_FILES['file_up']['size'];
  echo $_FILES['file_up']['name'];
  
  if ($_FILES['file_up']['size']&gt;250000){
      $msg=$msg."Your uploaded file size is more than 250KB
   so please reduce the file size and then upload.&lt;BR&gt;";
  $file_upload="false";
  }
  
  if (!($_FILES['file_up']['type'] =="image/jpeg" OR $_FILES['file_up']['type'] =="image/gif"))
  {
      $msg=$msg."Your uploaded file must be of JPG or GIF. Other file types are not allowed&lt;BR&gt;";
  $file_upload="false";
  }
  
  $file_name=$_FILES['file_up']['name'];
  
  if($file_upload=="true"){
  
  $ftp_server = "xxxxxxx";
  $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
  $ftp_username = "xxxxxx";
  $ftp_userpass = "xxxxxx";
  $login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
  if($login){
      echo '&lt;h1&gt;CONNECTED TO FTP&lt;/h1&gt;';
  $file = $file_name;
  
  // upload file
  if (ftp_put($ftp_conn, $file, 'img/userPics/', FTP_BINARY)) 
    {
    echo "Successfully uploaded $file.";
    }
  else
    {
    echo "Error uploading $file.";
    }
  }//if file upload == true
  }//if result
  // close connection
  ftp_close($ftp_conn);   
  </code></pre>