[go: nahoru, domu]

PHP 8.4.0 Alpha 4 available for testing

Voting

: one plus five?
(Example: nine)

The Note You're Voting On

mkas at destiny dot lt
12 years ago
recursive file search

<?php
$path
[] = 'starting_place/*';

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
}
}
}
?>

<< Back to user notes page

To Top