Seems a little bit of an odd question to be asking. What path does opendir() expect?
When I try: opendir('/home/myuser/public_html'); and get this [function.opendir]: failed to open dir: No such file or directory.
If that path isn’t correct, what should it be?
The syntax you use is fine. (see the PHP Manual on opendir)
The path either doesn’t exist, or the PHP user doesn’t have the right to access it.