I want to browse all folders on my computer without using opendir(), in PHP.
Why don't you use the following?
opendir(DIRECTORY_SEPARATOR);