2
use
<{php}> include("filename.php") <{/php}>
also this works:
I in my theme use a script logo_izquierdo.php:
function rnd($min, $max){//mt_rand wrapper, seeds automatically, once per page
global $rnd_seeded;
if ($rnd_seeded!=1){//seed if not seeded
$mtime=microtime();
list($usec,$sec)=explode(" ",$mtime);
mt_srand($usec*$sec);
$rnd_seeded=1;
}
return mt_rand($min, $max);
}
$def_img_url="http://unruly.homeunix.net/images/misc/macos_x_ua.png";
//default image to redirect to if no images exist in random dir
//read folder
$folder=opendir(".");
while ($file = readdir($folder)){
$ext=strtolower(substr(trim($file),-4));
if ($ext==".jpg"||$ext==".gif"||$ext=="jpeg"||$ext==".png")$imgs[]=$file;
}
closedir($folder);
if (is_array($imgs)){
header ("location: ".$imgs[rnd(0, count($imgs)-1)]);
}else{
header ("location: $def_img_url");
}
?>
http://ciberespia.adictoshp.org/themes/ce6_/logo/logo_izquierdo.phpin my theme:
Random Images upload in folder-> logo .
to see it work in
http://www.ciberespia.com