Save files names in array
without scandir() function
Copy this code and paste it in your HTML
<?php
{
while(($file = readdir($dir)) !== false) {
if(is_dir($file)&&$file!=="."&&$file!=="..") { $array[] =$file." (dir)"; } elseif(is_file($file)) { $array[] =$file." (file)"; } }
}
?>
Report this snippet
Comments
Subscribe to comments