filesystems - Max size of PHP array and glob -
hi i'm trying build simple cli script read files in directory , rename them after applying simple rules. having issue though in not items in directory being grabbed. i'm assuming limit in php or file system or combination of two. question is: there way increase memory size or array size limit in php can grab items @ once?
here script.
set_time_limit(0); # \\work\temp\medium define("base", directory_separator.directory_separator."work".directory_separator."temp".directory_separator."medium".directory_separator); $files = glob(base . "*-1.jpg"); # echo print_r($files,true); # die(); $count = 0; foreach ($files $k => $v) { $v = str_replace(base, "", $v); # echo $v; $count++."\r\n"; echo $count; } die(); i know there 120,000 items in folder count gets 20,006. curious number wondering if shed light on me?
this command line script running locally on machine files on network drive.
thanks in advance.
opendir(base) loop grabbed files. worked.
Comments
Post a Comment