title: Whats wrong with my PHP ftp_put?
body: <p>this is frustrating... I keep getting an error with my ftp_put:</p>
  
  <p>This the error: No such file or directory in /Users/xxxx/Documents/Work/something</p>
  
  <p>Is there any glaring errors in my code I'm blind to? </p>
  
  <pre><code>$server = "79.170.40.xxx";
  
  $connection = ftp_connect($server);
  
  $login = ftp_login($connection, "xxx.xxx.co.uk", "xxx");
  
  if (!$connection || !$login) { die('Connection attempt failed!'); }
  
  $upload = ftp_put($connection, '/home/sites/xxx.xxx.co.uk/public_html/dev/uploads/training/powerpoints/' . $filename, $details['tmp_name'], FTP_ASCII);
  
  if (!$upload) { echo 'FTP upload failed!'; }
  
  ftp_close($connection);
  </code></pre>
  
  <p>Cheers.</p>