problem to open dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all
i am getting some unexpected error while try to read a local dir..
it is working on the pc where apache is running ..but same code not 
working while trying from other pcs in lan..
here is code..
$dir="C:\Documents and Settings\pravin\Desktop\abcd2";
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
       while (($file = readdir($dh)) !== false) {
          echo "filename: $file : filetype: " . filetype($dir . $file) ."\n";
       }
       closedir($dh);
   	 }
	}

$dir = dir($source);


giving error:
Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): failed to 
open dir: Invalid argument in G:\Vyapar\AdvMgmt\addadvt3.php on line 
69

Fatal error: Call to a member function on a non-object in 
G:\Vyapar\AdvMgmt\addadvt3.php on line 70
 



---------
Experience is what you get when you didn't get what you wanted.
---------
Regards
Pravin Kumar
Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
http://geocities.com/pravin_suman/
http://pravindeo.blogspot.com

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux