My ISP logs the site access statistics in a directory (/stats) in the same path as /htdocs. I cannot figure out how to access this directory in the following code. /htdocs seems to be the route directory. I am able to FTP from the directory.
<head>
<title>Browse Logs</title>
</head>
<body>
<h1>Site Traffic Logs</h1>
<?
$current_dir = "../stats/";
$dir = dir($current_dir);
echo "Upload directory is ".$dir->path."<br>";
echo "Directory Listing:<br><hr><br>";
while ($file = $dir->read())
{
$the_type = substr(strrchr($file, "."), 1);
if ($the_type == "html")
{
echo "<a href=".$current_dir.$file.">".$file."</a><br>";
}
}
echo "<hr><br>";
$dir->close();
?>
</body>