array(1) {
[0]=>
string(8) "outgoing"
}
bool(false)
array(1) {
[0]=>
string(8) "outgoing"
}
bool(false)
Is currently being produced by
$connect = ftp_connect('example.com');
$result = ftp_login($connect, 'username', 'password');
echo '<pre>';
var_dump(ftp_nlist($connect, ''));
var_dump(ftp_nlist($connect, '/outgoing/'));
var_dump(ftp_nlist($connect, '/2689312/'));
var_dump(ftp_nlist($connect, '/2689312/outgoing/'));
But why isn't it letting me list lower than the top directory? This is really stumping me. I can't even get into a sub folder let alone the full folder scheme I need to open.
Any ideas?
To get the list of the CWD, instead of:
var_dump(ftp_nlist($connect, ''));
you need to do:
var_dump(ftp_nlist($connect, '.'));
I believe if you want to deeper from there the directory must be:
./subdirectory
You must first use
ftp_chdir
to change the directory.It took me forever to figure this one out.
Most FTP services do not let the FTP client who is connecting go further down than the home directory. So check the home directory of the user that is connecting.
It could also be that you are calling the directory wrong.
If
/2689312/
is below your starting directory. Try doing../2689312/