Re: new FTP function

From: Date: Fri, 18 Jan 2013 15:31:37 +0000
Subject: Re: new FTP function
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-65029@lists.php.net to get a copy of this message
An extra parameter is required in the above function, but you get the point, i don't want to keep spamming the mailing list with corrections :-) On Fri, Jan 18, 2013 at 3:30 PM, Paul Dragoonis <dragoonis@gmail.com> wrote: > Revised function: > > function dir_exists($conn, $currentDir) { > $list = ftp_nlist($conn, '-dF '. $currentDir); > return in_array($dir, $list); > } > > > On Fri, Jan 18, 2013 at 3:28 PM, Paul Dragoonis <dragoonis@gmail.com>wrote: > >> >> On Fri, Jan 18, 2013 at 3:18 PM, KISE <wowkise@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); >> } >> > >

« previous php.internals (#65029) next »