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

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

 

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

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