confused on opendir()
I am going through a very sticky problem. I am running this script from one domain
(churchsiteonline.com)in the same server where the other domain (sermonnetwork.com) is
also present. I want to open a directory of sermonnetwork.com from the place where the
script is running.
But, i am getting the E_WARNNING : "failed to open directory invalid path given" always.
where as the path is correct.
As per my server description i am running on windows 2003 with IIS and PHP 4.3
configure with it.
Please, give your suggestion if anyone also face the same acute problem which i am
facing right now. (I've also use the chdir() function. but do not get any good result.)
below is code snippet which i tried.
-------------------------------------------------------------------------------
#Set the path.
$basePath = "C:\\Inetpub\\vhosts\\sermonnetwork.com\\httpdocs\ \diba\\";
//chdir($basePath);
// Open a known directory, and proceed to read its contents
if (is_dir($basePath)) {
if ($dh = opendir($basePath)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($basePath . file) . "\n";
}
closedir($dh);
}
}
-----------------------------------------------------------------------------------
thanks
dibakar
|