PHP Classes

File: image_rotator_test.php

Recommend this page to a friend!
  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: 19 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();?>'>