You could do:
$list .= "<li><FONT COLOR=\"yellow\"><A
href=\"displog.php?file=reports/daily/logfiles/$client.$dow\">$fileName</A>
is $holdStr</FONT>";
Then in the displog.php file:
$file = $_SERVER['DOCUMENT_ROOT'] . '/' . $_GET['file'];
However, note that this type of thing is pretty bad from a security standpoint, as a hacker might find that he can read files you'd rather he did not by putting in a path with the right combination of ".." and directory names. Probably better would be to just pass the filename, filter it with [man]basename[/i] in the script, then hard-code the path within the script. If the files can be in more than one directory, then pass an additional parameter for that:
<a href='displog.php?file=test.log&type=daily'>Daily Report</a>
$file = basename($_GET['file']);
$type = basename($_GET['type']);
switch($type)
{
case 'daily':
$dir = $_SERVER['DOCUMENT_ROOT'].'/reports/daily';
break;
case 'weekly':
$dir = $_SERVER['DOCUMENT_ROOT'].'/reports/weekly';
break;
default:
die("Invalid report type specified");
}
if(is_readable($dir.'/'.$file))
{
// output $dir.'/'.$file
}
else
{
// file not found error
}