title: error in upload file to ftp with ftp_nb_fput
body: <p>I wrote this code for upload file via ftp. </p>
  
  <pre><code>&lt;?php
  
  $file = 'index.php';
  
  $fp = fopen($file, 'r');
  
  $conn_id = ftp_connect($ftp_server);
  
  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
  
  // Initate the upload
  $ret = ftp_nb_fput($conn_id, $file, $fp, FTP_BINARY);
  while ($ret == FTP_MOREDATA) {
  
     // Do whatever you want
     echo ".";
  
     // Continue upload...
     $ret = ftp_nb_continue($conn_id);
  }
  if ($ret != FTP_FINISHED) {
     echo "There was an error uploading the file...";
     exit(1);
  }
  
  fclose($fp);
  ?&gt;
  </code></pre>
  
  <p>and I get this error:
  Warning: ftp_nb_fput(): Could not open data connection to port 2804: Connection refused
  I disable my firewall but not work!</p>