ftp upload not working
<p>File is not uploading to ftp and erro: Warning: ftp_put() [function.ftp-put]: Can't open that file: No such file or directory coming. 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>
