Re: ftp_nlist()

From: Date: Sun, 12 Sep 2004 12:48:30 +0000
Subject: Re: ftp_nlist()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-196437@lists.php.net to get a copy of this message
On Sunday 12 September 2004 10:08, Karol Krizka wrote: > 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... Looks OK and works for me. Not sure why you would want to chdir first. Why not just: function get_files($dir="/") { $array=ftp_nlist($this->connection,$dir); var_dump($array); } Works just as well AFAICS. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* The plot was designed in a light vein that somehow became varicose. -- David Lardner */

« previous php.general (#196437) next »