When using following code:
if ($handle = opendir('../flat')) {
}
I'm getting this error:
Warning: opendir(../flat) [function.opendir]: failed to open dir: No such file or directory in D:\Inetpub\webs\mysite\newSite\lib\flat.php on line 1
Using
dirname(__FILE__);
I can see the correct path of my PHP script:
D:\Inetpub\webs\mysite\newSite\lib
Using absolute path opendir
works good:
if ($handle = opendir('D:\Inetpub\webs\mysite\newSite\flat')) {
}
What could be the problem? Can someone help me?