Esempio n. 1
0
function readDirectory($params)
{
    global $fileDir;
    if (isset($params["directory"])) {
        $dir = $fileDir . $params["directory"];
        outputDirectoryListing($dir);
    } else {
        outputDirectoryListing($fileDir);
    }
}
Esempio n. 2
0
function outputDirectoryListing($directory, $recursive = true)
{
    if (!is_dir($directory)) {
        return;
    }
    $dir = opendir($directory);
    if (substr($directory, strlen($directory) - 1, 1) !== "/") {
        $directory .= "/";
    }
    while (($file = readdir($dir)) !== false) {
        if (filetype($directory . $file) === "dir") {
            if ($recursive) {
                if ($file !== "." && $file !== "..") {
                    outputDirectoryListing($directory . $file, true);
                }
            }
        } else {
            echo encodeUrlEntity($directory . $file);
            echo " #modification time: ";
            echo filemtime($directory . $file);
            echo "\n";
        }
    }
}
Esempio n. 3
0
#index modificationtime: <?php 
echo filemtime("index.php");
?>
#configuration modificationtime: <?php 
echo filemtime("configuration.php");
?>
#htaccess modificationtime: <?php 
echo filemtime(".htaccess");
?>

CACHE:
<?php 
outputDirectoryListing("css");
outputDirectoryListing("js");
outputDirectoryListing("lib");
outputDirectoryListing("img/icons");
outputDirectoryListing("img/html5apps");
outputDirectoryListing("img", false);
outputDirectoryListing("fonts");
?>
fonts/fontawesome-webfont.ttf?v=4.0.3 #<?php 
echo filemtime("fonts/fontawesome-webfont.ttf");
?>

php/titlesDB.php # <?php 
echo filemtime("php/titlesDB.php");
//TODO: specify this in a way that doesn't depend on the php scripts modification time
?>

NETWORK:
*