PHP closedir() Function

The closedir() function closes a directory handle.Closes the directory stream indicated by dir_handle. The stream must have previously been opened by opendir().

Example -


dir_handle ⇩

The directory handle resource previously opened with opendir(). If the directory handle is not specified, the last link opened by opendir() is assumed.