The error says 'Call to undefined function filesInDir()'
Code: Select all
class ModelCatalogDownload extends Model {
function filesInDir()
{
$tdir = "/home/bruce/public_html/cat/system/download";
$added = 0;
$dirs = scandir($tdir);
foreach($dirs as $file)
{
if (($file == '.')||($file == '..'))
{
}
elseif (is_dir($tdir.'/'.$file))
{
filesInDir($tdir.'/'.$file);
}
else
{
do something here
}