Re: ftp_nlist()
| From: | Curt Zirzow | Date: | Mon, 13 Sep 2004 17:51:35 +0000 |
| Subject: | Re: ftp_nlist() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196533@lists.php.net to get a copy of this message | ||
* 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.