The function of opendir() function is: open the directory handle.
If this function runs successfully, it will return a set of directory streams (a set of directory strings), if it fails, it will return an error [error]. You can hide errors by adding "@" at the beginning of the function.
syntax Syntax opendir(directory,context) parameter
Parameter description
Description Directory required. specifies the directory to stream
Required parameters. Specify directory object
Optional parameters. Specify the context of the directory object that needs to be processed. This context includes a set of options that can change the way the text stream is displayed