Forum Moderators: coopster
$dir = "\\theotherserver\public";
$dh = opendir($dir);
$i = 0;
while (false!== ($filename = readdir($dh)))
{
print $filename;
if($filename<>"." and $filename<>"..")
{
$array[$i] = $filename;
$i++;
}
}
Any tips or hints on how to get this to work?
Thanks,
Shawn
PHP Warning: opendir(\\\\theotherserver\\public): failed to open dir: No such file or directory in /var/www/html/nballoys.htm on line 26, referer: [myserver...]
PHP Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/html/nballoys.htm on line 29, referer: [myserver...]
File does not exist: /var/www/html/temp, referer: [myserver...]
The path on the remote computer in samba is: /home/public
If I use that path the code looks on the local computer which does not have that path.
Some of the paths I have tried:
\\theotherserver\public
//theotherserver/public
/theotherserver/home/public
/theotherserver/public
file://theotherserver/public
It doesn't seem to recognize a UNC path at all.
I have control of both machines and can make changes as needed for the most part.
ls -la /home/public
$dir = "/home/public";