I have recently learned about DirectoryIntegrator (thanks to this forum) and have read the PHP manual. The code I found as a starter works to list the files.
<?php
foreach (new DirectoryIterator('../myfolder') as $fileInfo) {
if($fileInfo->isDot()) continue;
echo $fileInfo->getFilename() . "<br>\
";
}
?>
I then tried to get the list of files and provide a link to the files. That is where my lack of knowledge showed up and I have a RuntimeException with my code.
I will have to ask my host to upgrade me to PHP 5.3. I currently have PHP 5.2.17.
The error is:
Fatal error: Uncaught exception ‘RuntimeException’ with message ‘DirectoryIterator::__construct(…/diocese) [<a href=‘directoryiterator.–construct’>directoryiterator.–construct</a>]: failed to open dir: No such file or directory’ in /diocese/clergy/directory_list.html:15 Stack trace: #0 /diocese/clergy/directory_list.html(15): DirectoryIterator->__construct(‘…/diocese’) #1 {main} thrown in /diocese/clergy/directory_list.html on line 15
If I change the echo statement to the un-modified echo, it will produce a list of files.