August 16, 2015

php how to get all files name from folder?


<?php
$insArr=array();
if ($handle = opendir('here is folder path name')) {
while (false !== ($file = readdir($handle)))
{
echo $file;
echo '<br>';
}
closedir($handle);}
?>

Its display name of all file/images from specific folder/directory,

Just change the folder/directory name what ever you want, and if you want any help then comment here!

Enjoy!

No comments:

Post a Comment

1980s Photo Prompts: Easy Online Copy & Paste

Are you on a quest to enhance your photography projects with a touch of nostalgic flair? Look no further than 1980s photo prompts. These car...