Re: picking files (server side) - need help please

From: Date: Wed, 23 Oct 2002 06:41:52 +0000
Subject: Re: picking files (server side) - need help please
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-16487@lists.php.net to get a copy of this message
Thanks for your suggestion, I'll try it out. By the way, couldn't you see my examples or whats with the < ... > ? "David Elliott" <list@elliott.uk.com> wrote in message news:1923107396.20021022154647@elliott.uk.com... > Hi Aidal > > On 22 October 2002 at 15:07:04 +0200 (which was 14:07 where I live) Aidal > graced us with these comments > > < ... > > > > I browse my own PC for files. > > well you can not browse for them. > > < ... > > > > Assuming that those pictures have already been uploaded to a certain dir on > > the web server, can this be done and if so how would one do this? > > Have a look at the code below it might give you a clue. > > ==========8<============================================================= > <table summary="file list" border="1" align="center"> > <?php > $handle=opendir('.'); > while ($file = readdir( $handle)) > if( $file != ".." && $file != "." && $file != > "index.php") > { > echo "<tr>\n<td>\n<a > href='$file'>$file</a></td>\n". > "<td align='center'>".sprintf( '%1.3f', filesize( > $file) / (1024*1024)). > " Mb</td>\n". > "<td align='right'>\n".date('d-m-Y H:i',filemtime($file))."</td>\n</tr>\n"; > } > closedir( $handle); > ?> > </table> > ==========8<============================================================= > -- > Bye, _______________________________________________ > David | David Elliott | Software Engineer | > _________________________| list@elliott.uk.com | PGP Key ID 0x650F4534 | > | Respect, bah! It's more fun to make people afraid. | >

« previous php.windows (#16487) next »