change order

This commit is contained in:
wlx 2012-09-18 05:13:47 +00:00
parent 31a44ad226
commit 756ce90b97
1 changed files with 15 additions and 15 deletions

View File

@ -35,6 +35,20 @@ class mydir{
return $this->list[count($this->list)-1];
}
function array_flat($array)
{
foreach($array as $a)
{
if(is_array($a))
{
$tmp = array_merge($tmp, array_flat($a));
}else {
$tmp[] = $a;
}
}
return $tmp;
}
function recursive($dir)
{
$files = array();
@ -58,18 +72,4 @@ class mydir{
}
return $this->array_flat($files);
}
function array_flat($array)
{
foreach($array as $a)
{
if(is_array($a))
{
$tmp = array_merge($tmp, array_flat($a));
}else {
$tmp[] = $a;
}
}
return $tmp;
}
}