4

Well, what I am trying to do is, to get space information of disks in a LAN. I stored the UNC Paths in a XML-File and loop through it.

In PHP I do:

$filename = 'C:/...../config/config.xml';
echo '<div class="container">';

if (file_exists($filename)) {
    $xml = simplexml_load_file($filename);

    foreach($xml->children() as $Path) {
        foreach($Path->children() as $Path1) {
           $disk = disk_total_space($Path1);
.
.

This works very well actually, but when I try to get information of disk in a another network, it fails. So when I connect via UNC-Path on windows (with username and password) first, then it works, because now I have access. I can map network disks, but that's not a good solution for me, because there are to many disk.

Now my question is, is there a way to pass username and passwort to the UNC-Path?

Murat Yazi
  • 85
  • 1
  • 8

1 Answers1

0

Install your Web Server as a service and set the appropriate credentials in:
Log On >> This account
Provide valid username and password (credentials that has access to UNC-Path) and restart your Web Server.

Halayem Anis
  • 7,654
  • 2
  • 25
  • 45