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

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...