read files in folder

Firefox

New Member
In my application there is a folder name videos. i want to raed all file only of this folder I have done almostly it does not show any folder in folder videos except .DS_Storecurrently i have applied if condition to hide this but i want a perfect solution can any one help:- my code is :----\[code\]<?php $dir = "../videos/"; $dh = opendir($dir); ?> <select size="4" name="vidfile"> <?php while (($file = readdir($dh)) !== false) { if (is_file($dir.'/'.$file) && $file != "." && $file != ".."){ if($file!=".DS_Store"){?><option><?php echo $file ; ?></option> <?php } }}?></select><?php closedir($dh);?> \[/code\]
 
Back
Top