ftp php dosyası uploadin

1 Cevap
<?php
   ini_set('max_execution_time', '0');

   $host = '234.546.155.485';
   $usr = 'fgfgfgdf';
   $pwd = 'fghghh';

   // file to move:
   $file = 'http://vsomesite.com/file.flv';
   $ftp_path = '/public_html/video57242/test.flv';

   // connect to FTP server (port 21)
   $conn_id = ftp_connect($host, 21) or die ("Cannot connect to host");

   // send access parameters
   ftp_login($conn_id, $usr, $pwd) or die("Cannot login");

   // turn on passive mode transfers (some servers need this)
   // ftp_pasv ($conn_id, true);

   // perform file upload
   $upload = ftp_put($conn_id, $ftp_path, $file, FTP_ASCII);

   // check upload status:
   print (!$upload) ? 'Cannot upload' : 'Upload complete';
   ?>

dosya uzaktan yerel değilken yükleme başarısız olur. ne sorunu?

1 Cevap

Your variables don't add up. You use $local_file sizin ftp_put() görüşmesi, ama sadece $file önceki komut beyan

Ve size bir FLV dosyası için FTP_ASCII kullanıyor olmalıdır emin misin? Ben ikili olduğunu sanırdım.

Edit
Scratch my first point. Seems you edited it away :)