specifically in a php block of simple portal 2.3.5 in Simple Machines Forum 2.0.7.
I want to display a random image from a folder.
Code:
$dir = 'http://mywebsite.com/random'; $images = glob($dir. '*.{jpg,jpeg,png,gif}', GLOB_BRACE); $randomImage = $images[array_rand($images)];
echo '';
?>
Huh. The inequality brackets apparently work even when in a code-box... the code that is not displayed is: inequality-bracket img src="'.$dir.$randomImage.'" width=89 inequality-bracket
Meh. It only displays a missing image placeholder, not unlike the one echoing above .
It's so simple... yet so not working.
Any help?
p.s. I couldn't post this subject line because it says no profanity... "Any php gurus?" LOL... what profanity? Is php so bad it's a three letter four-letter-word?
edit: oh...
Edited by Gatinho (02/09/14 11:31 AM)
|