Files
infoscreen/slideshow.php
root (ariane) cccaa274f8 init commit
2025-10-10 20:31:12 +02:00

24 lines
527 B
PHP
Executable File

<?php
// PHP section
// set some variables
// Image directory! fill in! relative to root
$imageDir = '/slideshow/';
define('SERVERPATH', $_SERVER['DOCUMENT_ROOT'].$imageDir);
define('HTTPPATH', 'http://'.$_SERVER['HTTP_HOST'].$imageDir);
// read the names of images from the image directory
$dir = opendir(SERVERPATH);
$javascriptArray = null;
$i = null;
while (false !== ($file = readdir($dir))) {
if (substr($file, -3) == 'jpg'){
$javascriptArray[$i] = $file;
$i = $i+1;
}
}
closedir($dir);
// Html section
?>