There's a whole bunch of files. How do we find what we need, and the way to do that is to find the corresponding directory. Open the directory. Traverse all files. Each file is scanned again if it contains a display and does not continue looking until the end.
Paging File (allfile.php)
<div id= "Checkarea" >
<h2>just Check it!</h2>
<form action= "check.php" method= "POST" >
Input the folder ' s relative path:<br/>
<input type= "text" name= "Checkdir"/><br
Input What you wanna check:<br/>
<input type= "text" name= "Checkstr"/><br
<input type= "Submit" value= "check!" class= "btn"/>
</form>
</div>
Content Processing file (check.php)
<?php
//Get to the page to pass the file path, need to query the string
//Remove all spaces in the string, enter, tab indent
$dir = $_post["Checkdir"];
$check = $_post["Checkstr"];
$check = Str_replace ("", "", $check);
$check = Str_replace ("rn", "", $check);
$check = str_replace ("T", "", $check);
//Open Directory
$dir _handle = Opendir ($dir);
$date = "";
echo "<table id=" Allfile ">n";
echo "<tr><th class=" ListNum >num</th><th>stauts</th><th class= "AlignLeft" >file name</th><th>file Size</th><th>file type</th><th>time</th>< /tr> ";
$listNum = 0;
while ($file = Readdir ($dir _handle)) {
if (filetype ($dir. $file)!= "dir") {
$listNum + +;
echo "<tr><td class=" ListNum ">". $listNum. " </td> ";
//Get all the contents of the file (string)
$date = file_get_contents ($dir. $file);
//Remove all spaces in the string, enter, tab indent
$date = Str_replace ("", "", $date);
$date = Str_replace ("rn", "", $date);
$date = str_replace ("T", "", $date);
//Detect if a specific string is included
if (strstr ($date, $check)) {
echo "<td><span>√</span></td>";
}else{
echo "<td><span class=" Red ">X</span></td>";
}
$date = "";
//Print results
echo "<td class=" alignleft "><a href=" "". $dir. $file. "target=" _blank ">". $file. " </a></td> ";
echo "<td>" FileSize ($dir. $file). "Byte</td>";
echo "<td>" filetype ($dir. $file). </td> ";
echo "<td>". Date ("Y-n-t", (Filemtime ($dir. $file)). " </td> ";
echo "</tr>n";
}
}
echo "</table>n</div>";
//Close directory
Closedir ($dir _handle);
?>
style sheet files are not written. You need to change it as you want.