The PHP function opendir() opens a directory handle. It takes directory path as parameter that to be opened. The readdir() function read from directory handle. The entries are returned in the order in which they are stored by the filesystem. The closedir() function is used to close a directory handle that is opened by the opendir() function.
Solution
Let's implement a script to allow directory browsing of the uploaded content. Browsing directories is actually straightforward in PHP.
The following script can be used for this purpose -
The PHP function opendir() opens a directory handle. It takes directory path as parameter that to be opened. The readdir() function read from directory handle. The entries are returned in the order in which they are stored by the filesystem. The closedir() function is used to close a directory handle that is opened by the opendir() function.
need an explanation for this answer? contact us directly to get an explanation for this answer