What is closedir in PHP Directory
In this article I am going to explain about closedir function in PHP.
PHP closedir() function
The directory closedir function is used to close the open directory, who is previously opened by opendir function.
Syntax of closedir function
Parameters in closedir function
It has only one parameter:
||It specifies the directory handle to close.
Example of directory closedir function
$dir = opendir("C:\wamp\www\Dinesh");
while (($file = readdir($dir)) !== false)
echo "filename: " . $file . "<br />";
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here