Style: myInvision 3.3.0
PHP version: 7.0
MySQL: 5.5.58
I have a simple php script that reads the content of a folder and generates a random 100x100 px logo graphic
I've spend most of the day today searching the forum and trying many of the suggestions that appeared would work without success. There appears to be a few abandoned extensions that are recommended to NOT use
I would "like" to call the script in with a php include so that I do not need to do a lot of re-coding after a product update/upgrade. I have enough file customization already to deal with so prefer a single include line
Code: Select all
<?php
$imagesDir = 'img/';
$images = glob($imagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
$randomImage = $images[array_rand($images)];
echo '<img src="'.$randomImage.'" />';
?>
the images are in a subfolder of random-images called img
Code runs fine as a standalone: https://forums.toyota-campers.com/style ... m-logo.php
Each page refresh selects an image to display.
Thanks for any help in sorting this out