RE: FTP Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nope - unfortunately, no change, still the same problems, logging in but no
ftp_nlist or indeed ftp_rawlist

Cheers
Nunners

-----Original Message-----
From: nicolas figaro [mailto:nfigaro@xxxxxx] 
Sent: 27 June 2006 14:12
To: James Nunnerley
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  FTP Problems

I had many troubles with ftp_nlist since I discovered the "-a" option.

try this :

$buff = ftp_nlist($conn_id,"-a");


N F

James Nunnerley a écrit :
> I'm trying to create some functionality which requires FTPing onto another
> server, using the php functions.
>
> Doing the following comes up with a successful login, but cannot display
the
> current directory; yet when I FTP directory from the server which is
serving
> the php pages, it works fine.
>
> // set up basic connection
> $conn_id = ftp_connect($ftp_server, 21);
> ftp_pasv($conn_id, true);
>
> // login with username and password
> $login_result = ftp_login($conn_id, $username, $password);
>
> // check connection
> if ((!$conn_id) || (!$login_result)) {
>
> echo "FTP connection has failed!";
> echo "Attempted to connect to $ftp_server for user $username<br />";
> exit;
>
> } else {
>
> echo "Connected to $ftp_server, for user $username<br />";
>
> }
>
> echo(ftp_pwd($conn_id)."<br />"); # Comes back with /
>
> $buff = ftp_nlist($conn_id,"");
>
> // close the FTP stream
> ftp_close($conn_id); 
>
> var_dump($buff); => comes back with bool(false)
>
> exit;
>
> Can anyone see what could be wrong?
>
>
> Cheers
>
> Nunners
>
>
>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux