<?php $dr = @opendir('/tmp/'); if(!$dr) { echo "Error opening the /tmp/ directory!<BR>"; exit; } while(($files[] = readdir($dr)) !== false); print_r($files); ?>