My main app is at:
'.app/index.php'
What I do from there is parse a directory
foreach (new DirectoryIterator('./app/uploads/images/') as $fileInfo) {
if($fileInfo->isDot()) continue;
$images[] = $fileInfo->getFilename();
}
And it works ok.
But, when I do the exact same thing from
'./app/models/tricky.php'
I get the error from the title.
Any clue what I'm doing wrong?
I also tried modifying path to '../app/uploads/images/'
but have no clue what else to do.
Thanks.