PHP Classes

File: rotexample.php

Recommend this page to a friend!
  Classes of Brett Dutton   Rotate Image   rotexample.php   Download  
File: rotexample.php
Role: Example script
Content type: text/plain
Description: Example use of this class
Class: Rotate Image
Display random images from a list in rotation
Author: By
Last change:
Date: 17 years ago
Size: 489 bytes
 

Contents

Class file image Download
<?
require_once ( "classes/RotateImage.php" );

// Get the base URL for the current location
$baseURL = "http://" . $_SERVER["HTTP_HOST"] . dirname ( $_SERVER["SCRIPT_NAME"] );

// Current path to this location
$path = dirname ( __FILE__ );

$rotate = new RotateImage ( $baseURL, $path, "images", "/^rotation_image_(.)*\.jpg$/" );
echo
$rotate->toHtml ();
?>