How can i list the contents of a windows share using PHP?
$SearchFolder = "\\\\192.168.1.100\\pdfoutput\\";
if (is_dir($SearchFolder))
{
if ($Directory = opendir($SearchFolder))
{
while (($File = readdir($Directory)) !== false)
{
if(filetype($SearchFolder.$File) == "file")
{
$this->Attachments[] = new Attachment($SearchFolder.$File);
}
}
closedir($Directory);
}
}
Print(opendir($SearchFolder)); gives this error:
Warning: opendir(\192.168.1.100\pdfoutput) [function.opendir]: failed to open dir: No error in C:\Users\gary\Webserver\QuickMail\maildetails.php on line 227
This is not working as expected. Any thoughts?