automatic slideshow of images in folder
Is there a standard script that can check what images are in a specific folder and than make a slideshow out of it?
I have tried to get this working but I can't get it to work:
First created a getimages.php file with the code below
<?
//PHP SCRIPT: getimages.php
Header(
//This function gets the file names of all images in the current directory
//and ouputs them as a JavaScript array
function returnimages(
$pattern=
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){ //if this file is a valid image
//Output it as a JavaScript array element
echo 'galleryarray[
$curimage++;
}
}
closedir($handle);
}
return($files);
}
echo 'var galleryarray=new Array();'; //Define array in JavaScript
returnimages() //Output the array elements containing the image file names
?>
-------
Then created a page called test.html like below
<html><head>
<script src="test/
<script type="text/
var curimg=0
function rotateimages(){
document.
curimg=
}
window.
setInterval(
}
</script>
</head>
<body>
<div style="width: 490px; height: 390px; text-align:center">
<img id="slideshow" src="test/
</body></html>
------------
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Xibo Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jaap Bos
- Solved:
- Last query:
- Last reply: