recursive belirli bir dosyayı bulmak

0 Cevap php

I'm trying to find all the files that called "testunit.php". In addition i want to cut the first 23 chars of the string.

Bu çalıştı ama bu tüm dosyaları almak working.I değildir.

$it = new RecursiveDirectoryIterator($parent);
$display = Array ( 'testunit.php');
foreach (new RecursiveIteratorIterator($it) as $file=>$cur) {
{
if ( In_Array ( $cur, $display ) == true )
               $file = substr($cur, 23)
               fwrite($fh,"<file>$file</file>");

}

Teşekkür ederiz!

0 Cevap