1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
$racine = $configIni->root.'documents/';
$file = htmlspecialchars($_GET['f']);
$a = array('..','../','..','..%2F',);
$b = array('','','','');
$file = str_replace($a,$b,$file);
$file = htmlspecialchars($file);
if(isset($_GET['f']))
$racine = $configIni->root.'documents'.urldecode($file);
try{
$explorer = new File_FolderManager(utf8_decode($racine));
//$explorer->setFilter('avi|wmv|pdf');
$fichiers = $explorer->listFile();
$dossiers = $explorer->liste();
}
catch(Util_ExceptionHandler $e){
echo $e->getError();
} |
Partager