PHP нет такого файла или каталога
php file or directory searcher
kaniberkali
php file or directory searcher
$results = searchDirToArray($_SERVER["DOCUMENT_ROOT"],"searchVal");
function searchDirToArray($dir,$searchValue) {
global $directories;
$result = array();
$cdir = scandir($dir);
foreach ($cdir as $key => $value)
{
$path = $dir . DIRECTORY_SEPARATOR . $value;
if (!in_array($value,array(".","..")))
{
if (is_dir($path))
$result[$value] = searchDirToArray($path,$searchValue);
else
$result[] = $value;
if(str_contains($path,$searchValue))
$directories[]=str_replace("\\","/",$path);
}
}
return $directories;
}