PHP readdir Function – Read Directory

PHP readdir() directory function

Read files from directory in PHP.

The readdir() function is used to read files from directory in PHP.

readdir() function syntax




Example of readdir() in PHP

<title>Read Directory in PHP</title>
<FORM method="POST">
Enter Directory Name : <input type="text" name="str"> <br/> <br/>
<input type="submit" name="Submit1" value="Read Files">

echo $file ."<br/>";

The output of read directory php function example is :

PHP read directory
PHP readdir function example for read files from directory.

Leave a Reply

Your email address will not be published. Required fields are marked *