You are here: RE: [PHP] FTPS transfers « PHP « IT news, forums, messages
RE: [PHP] FTPS transfers

Posted by Jim Moseby on 09/26/05 20:39

> -----Original Message-----
> From: Jason Petersen [mailto:fuzzybad@gmail.com]
> Sent: Monday, September 26, 2005 1:15 PM
> To: php-general@lists.php.net
> Subject: [PHP] FTPS transfers
>
>
> Hello List,
>
> I'm having some issues with PHP's FTPS support. I'm using
> ftp_ssl_connect()
> to establish a connection (which is successful), however I am
> unable to
> retrieve a directory listing or upload files. Does anyone
> have advice for
> getting this to work? The uploaded file is created with a
> filesize of zero.
>
> My code looks something like this:
>
> $conn = ftp_ssl_connect($FTP['host']);
> $result = ftp_login($conn, $FTP['user'], $FTP['pass']);
>
> $file = 'test.txt';
> $fp = fopen($file, 'r');
>
> ftp_fput($conn, $file, $fp, FTP_ASCII)
>
> fclose($fp);
> ftp_close($conn);

Jason,

Try adding

ftp_pasv ( $conn, true );

JM

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация