I want to browse all folders on my computer without using opendir(), in PHP.
I think I managed to extract the real question out of the comments: What you actually want is to provide an upload of multiple files.
Answer: No this is not possible with PHP, since it is executed by the server, not by the browser. PHP can give you folders on the server, not on the machine of the user. If you want to upload multiple files in a single step, you should use flash, javascript or something similar.
In one of the comments, seeming says:
i want the user to select couple of files and upload rather than having multiple upload boxes. why are people downvoting this question?
Well, it is because your question is unclear and it is impossible to answer without the context of multiple file uploads.
The answer is: you can't do that with PHP. PHP runs serverside, so it can only give you a list of all the folders on the server; not the folders on the client side.
So the solution you need will either be
Why wouldn't you want to use the function that's actually provided to do what you want?
The result will be a very ugly combination of glob() and stat(). Is there some reason you can't work with opendir() and friends?
Edit:
If PHP does not have suitable permissions to access everything you want to see, using another function is not going to help.
What (exactly) are you trying to do?
Why don't you use the following?
opendir(DIRECTORY_SEPARATOR);