| 
 Posted by Krustov on 10/30/05 17:10 
<?php 
$dirname = "."; 
$dh = opendir($dirname); 
while ($file = readdir($dh)) 
{ 
if (is_dir ("$dirname/$file")) 
{ 
print ""; 
} 
print "$file<br>"; 
} 
closedir ($dh); 
?> 
 
 
.. 
... 
aaa.html 
etc 
 
The above code brings up the single and twin full stops - presumably the  
option to change directorys or whatever if wanted . 
 
Got the code snippet via google and just wondered if the above code is  
the best way it could be written .
 
  
Navigation:
[Reply to this message] 
 |