PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Everton da Rosa   PHP Scan Files in Directory   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example f use
Class: PHP Scan Files in Directory
Scan files and directories with DirectoryIterator
Author: By
Last change:
Date: 7 years ago
Size: 458 bytes
 

Contents

Class file image Download
<?php
try {
    require
'fsscan.php';

   
$nodes = new FSScan('/home/everton/Documentos/Prefeitura/Incategorizaveis');

   
//exibe o conte?do do ArrayObject
   
foreach ($nodes->getNodes() as $item){
        echo
'<pre>';
       
var_dump($item);
        echo
'<pre>';
        echo
'<hr>';

    }

   
//nodes como JSON
   
echo '<pre>', $nodes->getJSONNodes(), '</pre>';
} catch (
Exception $ex) {
    echo
$ex->getTraceAsString();
}
?>