Find files inside starting with a specific string using php
Find files inside starting with a specific string using php
Find files inside starting with a specific string using php
.This script will search for files that starts with a string [Whatever you give] inside the query string.
For instance if the below script is saved inside a file say search_files.php then the script will work if you provide www.
$dir = "logs"; $dh = opendir($dir); $dh1 = opendir($dir); while (($file = readdir($dh)) !== false) { $name_prom=$_GET['name']; $stng = strpos($file,$name_prom); if($stng === 0) { echo "<a HREF=\"$file\">$file</a><br />\n"; } } closedir($dh);Find files inside starting with a specific string using php,