|
|
Subject:
Listing of files in a directory over SFTP in PHP
Category: Computers > Programming Asked by: mike_sf-ga List Price: $15.00 |
Posted:
23 Mar 2006 19:14 PST
Expires: 24 Mar 2006 14:40 PST Question ID: 711338 |
How can I get a listing of files in a directory over SFTP in PHP 4.3? I need to get an array of strings containing the list of files in a specific remote directory over an SFTP connection. I am using the ssh2 PECL package (http://pecl.php.net/package/ssh2) deployed on Free BSD 4.7. I can successfully get a connection and even get a specific file using fopen(). Tried unsuccessfully: $connection = ssh2_connect($ftp_server, 22); ssh2_auth_password($connection, $sftp_user_name, $sftp_user_pass); $sftp = ssh2_sftp($connection); $dir = dir("ssh2.sftp://$sftp/$ftpPath"); Ideally, I would prefer not to use an external process (proc_open) as I am using a password for authentication. |
|
There is no answer at this time. |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |