|
Posted by PeteC on 05/16/07 07:50
I have a bit of code that looks like
define("DIRECTORYPENDING","import/pending");
$d = dir(DIRECTORYPENDING);
while (false !== ($file = $d->read()))
{
// Process all files in that directory
}
Which works fine for directories within the website.
In this particular case, however, the files I need are on a shared directory
on another server on the LAN (all servers are Server2003) at
\\server2\pending (or a mapped drive, Z:, pointing to the same location)
I've tried
define("DIRECTORYPENDING",\\server2\pending);
define("DIRECTORYPENDING","Z:\pending");
but it doesn't work (yes, I do have quotes in the correct place on the
define statements above, but Outlook Express removed them!)
The error message I get is
Warning: dir(\\server2\pending\) [function.dir]: failed to open dir:
Invalid argument in E:\TestOnline\lit\admin.php on line 58
Where the line in error is the line containing $d = dir(DIRECTORYPENDING)
So... how can I read the files from the remote directory? I have control of
both servers, so can change permissions etc if required.
TIA,
Pete.
Navigation:
[Reply to this message]
|