1) Script Title: Swiss Army Knife with php array
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...army/index.htm
3) Describe problem:
I have had this script working for some while now, but on miving to a different domain with same host, I cannot get the slides to work.
php script to pull out the array is:
<?
function returnimages($dirname="./../pics/") {
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
echo 'slides[' . $curimage .']=["' . $dirname . $file . '", "", ""];' . "\n";
$curimage++;
}
}
closedir($handle);
}
return($files);
}
echo "var slides=new Array();" . "\n";
returnimages();
?>
Both the scripts are pulled from off-page includes.
On the page there is no image but message "Slide Show Image"
I have tried every which way with this and get nothing yet on my original website with the same code it is working fine.
Any clue?
Cheers
Ian



Reply With Quote

Bookmarks