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 Marco Bonzanini  >  File_Info  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: File_Info example script
Class: File_Info
Retrieve information about a file and its type
Author: By
Last change:
Date: 10 years ago
Size: 513 bytes
 

Contents

Class file image Download
<?php
/**
* File_Info class example
*
* more docs in README-(it|en).html
*/

require_once 'File_Info.php';

$file '/home/marco/programma03-04.doc';

$f = new File_Info($file);

echo 
$f->getName() . "\n";
echo 
$f->getExtension() . "\n";
echo 
$f->getBasename() . "\n";
echo 
$f->getPath() . "\n";
echo 
$f->getDirname() . "\n";
echo 
$f->getSize(FILE_INFO_SIZE_KB3) . "\n";
echo 
$f->getSize() . "\n";
echo 
$f->getMime() . "\n";
echo 
$f->getType() . "\n";
echo 
$f->getAtime() . "\n";
echo 
$f->getMtime() . "\n";

?>