PHP’de Dizin Listeleme


<?php
function dizinlistele($yol) { 
$dizinac = opendir($yol); 
while ( gettype ($dizin = readdir($dizinac) ) != boolean ) { 
if ( is_dir("$yol/$dizin") ) { 
if ( ($dizin != ".") AND ($dizin != "..") ) { 
echo (ucwords($dizin)."<br>"); 
} 
} 
} 
closedir ($dizinac); 
} 
dizinlistele("./");

 

?>

Be the first to comment

Leave a Reply

Your email address will not be published.


*