11-09-2008, 08:15 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
|
RESOLVED -- List only some extention (File Listing)
Good day to you all,
I'm working on a pice of code which list all files in a directory and return the list and its content right under the name of the file.
PHP Code:
<?php $thelist = ""; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $thelist .= '<a href="'.$file.'">'.$file.'</a><br/>'; $contents = file($file); $string = implode($contents); $thelist .= '<p>'.$string.'</p>'; } } closedir($handle); } ?> <P>List of files:</p> <P><?=$thelist?></p>
I'm looking for a way of choose only 3 or 4 extension only.
How would I dow so ?
Thanks !
__________________
That's why we are not alone on earth... let's build !
Last edited by Peuplarchie : 11-10-2008 at 01:08 AM.
|
|
|
|