PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Richard Carson  >  PHP MySQL Image Display  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP MySQL Image Display
Serve images added to a MySQL database table
Author: By
Last change:
Date: 7 years ago
Size: 541 bytes
 

Contents

Class file image Download
<?php
   
/**
     * SQLimg usage example
     *
     * @author Richard Carson <rcarson@richardcarson.ca>
     * @copyright Richard Carson, 2014
     */
   
include('sqlimg.php');

   
# ATTENTION!
    # Before running this, be sure to run the initialization code in install.sql

    # Display the first image in the database - the installed demo image will do
    # display() will call die() once it is done, to prevent messing things up...
    # It must also be called before headers are sent!
   
foreach(SQLimg::all() as $key=>$type)
       
SQLimg::display($key);
?>

For more information send a message to info at phpclasses dot org.