Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of DigiOz Multimedia  >  DigiOz Indexer  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: DigiOz Indexer
Retrieve and sort directory file listings
Author: By
Last change: Added Date format statement to example to display dates in standard format.
Date: 2007-08-27 12:19
Size: 1,093 bytes
 

Contents

Class file image Download
<?php

////////////////////////////////////////////////////////////////// 
// Title:       DigiOz Directory Indexer Class EXAMPLE
// File Name:   example.php
// Description: The purpose of this file is to demonstrate the 
//              usage of the directory indexer class for users.
// Created On:  08-14-07
// Revised On:  08-27-07
// Author:      Pedram Soheil
// Website:     http://www.digioz.com
////////////////////////////////////////////////////////////////// 
/// 2-D Array Description:
///             Column 1: FILE NAME
///             Column 2: FILE DATE
///             Column 3: FILE SIZE
///             Column 4: FILE TYPE (DIR or FILE)
////////////////////////////////////////////////////////////////// 

include("clsIndexer.php");

$a = new indexer();
$files $a->listdir("./""SORT_ASC"1);
$i 0;

foreach (
$files as $row) {
   foreach (
$row as $col) {
        if (
$i == 1)
        {
            echo 
date("m/d/Y",$col)." | ";
            
$i++;
        }
        else
        {
            echo 
"$col | ";
            
$i++;
        }
   }
   echo 
"<br>";
   
$i=0;
}

echo 
"<br><br>Done";

?>