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
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php