问这个问题似乎有点奇怪。opendir()期望什么样的路径?
当我尝试的时候:opendir('/home/myuser/public_html');并得到这个[function.opendir]: failed to open dir: No such file or directory。
如果该路径不正确,它应该是什么?
发布于 2011-06-05 02:18:16
您使用的语法很好。(请参阅PHP Manual on opendir)
路径不存在,或者PHP用户没有访问它的权限。
发布于 2011-06-05 02:08:56
您应该使用相对路径..例如:如果您的PHP App驻留在/opt/project中,那么您应该将其用作('../../home/myuser/public_html')
https://stackoverflow.com/questions/6238502
复制相似问题