Heya KISE,

I just checked a bit around and found that current implementations actually
simply deal with the warning:

https://github.com/rjkip/ftp-php/blob/master/src/FtpPhp/FtpClient.php#L172-L186
https://github.com/rjkip/ftp-php/blob/master/src/FtpPhp/FtpClient.php#L92-L116

What kind of problems is the warning currently causing in your code?

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 18 January 2013 16:33, KISE <wowk...@gmail.com> wrote:

> Paul Dragoonis,
>
> Actually it wont work i did tried it before, if the dir end with / it will
> list the directories inside the path you gave it and if it doesn't have any
> directories it will return false since there is no directories to return.
>
> you have to take out the last / and then remove the directory in question
> and list the files in the parent directory and check if the dir exists
> otherwise it will return false, i spent 3hrs yesterday thinking why its
> returning false even though the directory exists.
>
> On Fri, Jan 18, 2013 at 6:28 PM, Paul Dragoonis <dragoo...@gmail.com>
> wrote:
>
> >
> > On Fri, Jan 18, 2013 at 3:18 PM, KISE <wowk...@gmail.com> wrote:
> >
> >>         $res  = ftp_nlist($this->conn_id, '-dF '. $dir);
> >>
> >
> > This could be done in two lines.
> >
> > function dir_exists($conn, $dir) {
> >         $list  = ftp_nlist($conn, '-dF '. $dir);
> >         return in_array($dir, $list);
> > }
> >
>

Reply via email to