Seznam souborů v adresáři include_cz
/**
* Change the path to your folder.
*
* This must be the full path from the root of your
* web space. If you're not sure what it is, ask your host.
*
* Name this file index.php and place in the directory.
*
* Source: http://www.totallyphp.co.uk/scripts/directory_lister.htm
*/
// Define the full path to your folder from root
$path = "/data/www/www.breviar.sk/public_html/include_cz/";
// Open the folder
$dir_handle = @opendir($path) or die("Nedokážu otevřít adresář $path");
//this is a function I wrote to sort out the contents of the directory date wise for display.
$content_array = array();
//Load Directory Into Array
$i=0;
while ($file = readdir($dir_handle))
if ($file != "." && $file != ".." && $file != "index.php")
{
$content_array[$i][0] = $file;
$content_array[$i][1] = date ("Y-m-d H:i:s", filectime($path."/".$file)); // JUV/2008-10-23, zmena filemtime -> filectime
$i++;
}
//close the directory handle
closedir($dir_handle);
//these lines sort the contents of the directory by the date
foreach($content_array as $res)
$sortAux[] = $res[1];
array_multisort($sortAux, SORT_DESC, $content_array);
//print
echo "\n";
echo "\nSoubor | Poslední modifikace |
";
foreach($content_array as $res)
echo "\n$res[0] | ".$res[1]." |
";
// $res[0].">".$res[1];
echo "\n
";
?>
Poslední modifikace:
echo date ("Y-m-d H:i:s", filemtime($_SERVER['SCRIPT_FILENAME']));
?>
Copyright 1999-2025 © Juraj Vidéky.