* Thus wrote Karol Krizka:
> Hello,
> I have the following class for ftp:
>
> -- class FTP {
>
> function get_files($dir="/") {
> ftp_chdir($this->connection,$dir);
> $array=ftp_nlist($this->connection,ftp_pwd($this->connection));
> var_dump($array);
> }
> }
>
> When I connect to ftp server for my website at
> ftp://kkrizka.mybesthost.com and try to use nlist function, it returns
> false. But when I used ftp_rawlist, it returned a list of files no
> problem. I tried to connect to a ftp server on my computer, and it
> worked normally. I am not sure what is wrong...
You should really check the status of each of those commannds
(ftp_chdir, ftp_pwd). They both can return false and can cause
your get_files to return the wrong directory results as well.
Curt
--
The above comments may offend you. flame at will.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php