All pastes #476358 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-08 01:01 UTC
rendered paste body
<?
 function getDirContents($file){
 	$path = $_SERVER['DOCUMENT_ROOT'].'/gallery/'.$file;
 	$dir_handle = @opendir($path);
 	while (false !== ($dr = readdir($dir_handle))) {
 		$chkfl = pathinfo($dr);
 		if($dr!="." && $dr!=".." && $chkfl['extension']!=NULL) {
 					echo '<option value="'.$dr.'">'.$dr.'</option>'."\n";
 		}
 	}
 	closedir($dir_handle);
 }
?>