|
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
[Back to original message]
|