Hi, Jason -
Thanks for your help with this. It's much appreciated.
I took your advice and discovered the code was generating the list correctly. This, however, only appeared to initiate a host other error messages - all regarding some kind of issue with the "header information".
What I discovered (by trial and error!) was that I'd made a mess of entering the CMSB code at the top of the script. I'd simply added the code as a block - which is standard practice with CMSB:
<?php
$libraryPath = 'cmsb/lib/viewer_functions.php';
$dirsToCheck = array('/etc/htdocs/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
etc...
etc...
?>
<?php
Download Counter script here....
etc...
etc...
?>
In effect there are two blocks of code. What I should have done was combine the two into one...
<?php
$libraryPath = 'cmsb/lib/viewer_functions.php';
$dirsToCheck = array('/etc/htdocs/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
etc...
etc...
Download Counter script....
etc...
etc...
?>
Now it works fine!
I've often encountered "header" errors before when working with CMSB so I really feel like I've learned something. I'm just not entirely sure what!
Perhaps you could explain why combining the blocks of code makes such a difference...
:0)
Perch