Page 2 of 2

Posted: Sun May 07, 2006 12:53 pm
by ozzy
Sorry about the double post (i would delete my old one but i always get in trouble becouse people think im bumping it :( ), but i have finaly done it now:

Code: Select all

<?php //...
$term = trim($_POST['query']); 
$files = glob($dir."./*"); 
foreach( $files as $key => $value ){ 
    if(preg_match("#".$term."#i", $value))
    echo $value."<br>"; 
} ?>
But i have one last question...

How would i edit it that it only shows the file name, not the directory and the file name? Thanks!