Created
December 31, 2011 09:44
-
-
Save tikitikipoo/1543545 to your computer and use it in GitHub Desktop.
ディレクトリの中身を処理
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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