note 105475 rejected from function.ftp-nlist by thiago
| From: | thiago@php.net | Date: | Sun, 21 Aug 2011 06:50:09 +0000 |
| Subject: | note 105475 rejected from function.ftp-nlist by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182623@lists.php.net to get a copy of this message | ||
Note Submitter: shekharcs84 at gmail dot com
----
I am able to connect ftp/sftp accounts of my web server using WINSCP, but when I am trying using php
code getting below error:
my code is : -
// set up basic connection
$conn_id = ftp_connect("webserver IP");
// login with username and password
echo $login_result = ftp_login($conn_id, "username", "password");
echo "kk".$pasvret = ftp_pasv($conn_id,TRUE);
echo "lll";
// get contents of the current directory
echo $contents = ftp_nlist($conn_id, ".");
// output $contents
print_r($contents);
Warning: ftp_nlist() [function.ftp-nlist]: php_connect_nonb() failed: No such file or directory (2)
in C:\wamp\www\FTP\ftp.php on line 11
Call Stack
# Time Memory Function Location
1 0.0008 674144 {main}( ) ..\ftp.php:0
2 1.4960 683368 ftp_nlist ( ) ..\ftp.php:11