Code: Select all
function getRecursiveFolderList($curDir,$currentA=false)
{
$dirs = glob($curDir . '/*', GLOB_ONLYDIR);
$cur = 0;
foreach($dirs as $dir)
{
$currentA[$cur]['path'] = $dir;
$currentA[$cur] = $this->getRecursiveFolderList($dir,$currentA[$cur]);
++$cur;
}
return $currentA;
}Code: Select all
$test = array();
echo getRecursiveFolderList("images",$test);"Fatal error: Using $this when not in object context"
How should that line be written? Or am I missing something more basic?
Thanks
-Elliott