I try to run on all files in /images
directory and I get disconnected when I reach the constructor part the directory is in the same directory as my php file:
$it = new FilesystemIterator('./images/');
foreach ($it as $fileinfo) {
echo $fileinfo->getFilename() . "\n";
}
The error I see is:
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'FilesystemIterator::__construct(/images/,/images/): The system cannot find the file specified. (code: 2)' in D:\wamp\www\MyHome2\php\images.php:9