예제 #1
0
 public function testValidResultFiles()
 {
     $result = json_decode(FileBrowser::getFolderContent(''), true);
     foreach ($result as $file_info) {
         if ($file_info['type'] == 'dir') {
             $this->assertTrue(is_dir($file_info['path']));
         } else {
             if ($file_info['type'] == 'file') {
                 $this->assertTrue(is_file($file_info['path']));
             }
         }
     }
 }
예제 #2
0
<?php

require_once 'FileBrowser.class.php';
$path = filter_input(INPUT_GET, 'path');
echo FileBrowser::getFolderContent($path);