motov.net

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color
Home arrow Tutorials arrow PHP arrow Recursive scan of a folder with php
Recursive scan of a folder with php Print E-mail
Monday, 24 September 2007
function read_my_dir($dir)
{
global $tfile,$tdir;$i=0;$j=0;$myfiles;
$myfiles[][] = array();
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file=readdir($dh)) !== false)
{
if (!is_dir($dir.?\?.$file))
{
$tfile[$i]=$file;
$i++;
echo $dir.?\?.$file.? - <b>File</b>
?;
}
else
{
if (($file != ?.?) && ($file != ?..?))
{
$tdir[$j]=$file;
echo $dir.?\?.$file.? - <b>Directory</b>
?;
//$sep = ?\\?;
read_my_dir($dir.?\?.$file);
$j++;
}
}
}
closedir($dh);
}
}
}
 
Last Updated ( Monday, 24 September 2007 )
 
< Prev   Next >

Proof of Verification

Login Form






Lost Password?
No account yet? Register

Instant Messaging

My status  bbh2k3
171-881-244

Let us know

Do you think our products are too expensive?
 

Syndicate