|
Posted by John Nichel on 09/26/05 20:39
Jason Petersen wrote:
> 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');
---^ This is a resource id
> ftp_fput($conn, $file, $fp, FTP_ASCII)
--------------------------^ And you're trying to upload the resource id
> fclose($fp);
> ftp_close($conn);
>
> Thanks,
> Jason
>
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com
[Back to original message]
|