Skip to content

Instantly share code, notes, and snippets.

@tikitikipoo
Created December 31, 2011 09:44
Show Gist options
  • Save tikitikipoo/1543545 to your computer and use it in GitHub Desktop.
Save tikitikipoo/1543545 to your computer and use it in GitHub Desktop.
ディレクトリの中身を処理
<?php
$path[] = '/Users/tikitikipoo/Pictures/scansnap/*';
while(count($path) != 0)
{
$v = array_shift($path);
foreach(glob($v) as $item)
{
if (is_dir($item))
$path[] = $item . '/*';
elseif (is_file($item))
{
//do something
//echo $item . "\r\n";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment