Re: [PHP] Windows directory listings

2007-01-08 Thread Jochem Maas
Beauford wrote: > ... >>> >>> >>> function searchdir ( $page , $maxdepth = -1 , $mode = >> "FILES" , $d = 0 ) { >>>if ( substr ( $page , strlen ( $page ) - 1 ) != '\\' ) { >> $page .= >>> '\\' ;} >> this if statement will run given the value of $page, it's not >> needed AFAIKT. >> then

RE: [PHP] Windows directory listings

2007-01-07 Thread Beauford
> -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: January 7, 2007 8:35 PM > To: Beauford > Cc: 'PHP' > Subject: Re: [PHP] Windows directory listings > > with regard to trolling - I'd don't *just* do that :-) > &

Re: [PHP] Windows directory listings

2007-01-07 Thread Jochem Maas
st[] = $file ; } } >elseif ( $d >=0 && ($d < $maxdepth || $maxdepth < 0) ) >{ >$result = searchdir ( $file . '\\' , $maxdepth , $mode , > $d + 1 ) ; > $dirlist = array_merge ( $dirlist , $result

RE: [PHP] Windows directory listings

2007-01-07 Thread Beauford
rlist = array_merge ( $dirlist , $result ) ; } } } closedir ( $handle ) ; } if ( $d == 0 ) { natcasesort ( $dirlist ) ; } return ( $dirlist ) ; } ?> > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Januar

Re: [PHP] Windows directory listings

2007-01-07 Thread Jochem Maas
Beauford wrote: > Hi, > > I am trying to write a script that reads a directory on Windows. All the PHP > functions I have looked at all seem to work with the Linux dietary it sounds more like you have found an examples that show windows being used (i.e. windows file paths). > structure. Is there