//define the path as relative $path = "Plastics"; // open the current directory by opendir $handle=opendir("Plastics"); echo "Contents of: $path"; while (($file = readdir($handle))!==false) { echo "$file "; } closedir($handle); ?>