title: ftp upload not working
body: <p>File is not uploading to FTP and errors: <strong>Warning: ftp_put() [function.ftp-put]: Can't open that file: No such file or directory coming</strong>. We are using following code:</p>
  
  <pre><code>    $server = 'ftp.domain.com';
  $ftp_user_name = 'upload@domain.com';
  $ftp_user_pass = 'password';
  $dest = 'files/test.txt';
  $source = 'test.txt';
  $src = ini_get("upload_tmp_dir");
  
  $connection = ftp_connect($server);
  $login = ftp_login($connection, $ftp_user_name, $ftp_user_pass);
  if (!$connection || !$login) { die('Connection attempt failed!'); }
  $upload = ftp_put($connection, $dest, $source, FTP_BINARY);
  if (!$upload) { echo 'FTP upload failed!'; }
  ftp_close($connection); 
  </code></pre>