Login   Register  
PHP Classes
elePHPant
Icontem

File: image_rotator_test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Harish Chauhan  >  Image Rotator  >  image_rotator_test.php  >  Download  
File: image_rotator_test.php
Role: Example script
Content type: text/plain
Description: Example
Class: Image Rotator
Pick random file from a directory to display
Author: By
Last change:
Date: 9 years ago
Size: 272 bytes
 

Contents

Class file image Download
<?php
require("imageRotator.inc.php");
$rot=new ImageRotator("images");

/*
OR
$rot=new ImageRotator;
$rot->setDirectory("images");
*/
///Functiuon ImageRotator::getRandomImage() will get the image file name randomly.
?>
<img src='<?=$rot->getRandomImage();?>'>