1. Read Sharing Directory
        Ex:
        <?php
               $path = ‘\\\\172.18.19.196\Resource$\images\bannersource’;//resource path from another machine
               if (is_dir($path)){ //check if it is a directory
                    if ($dh = opendir($path)){
                         while (($file = readdir($dh)) !== false){
                          echo “filename:” . $file . “<br>”;
                        }
                        closedir($dh);
                         }
                    $originalfile = glob($path.’/*.jpg’);
foreach ($originalfile as $original) {
     echo $original.'<br/>’;
     list($width, $height) = getimagesize($original);
     echo $width;
     echo $height;
}
               }
        ?>
         Note: Please go to config apache service by add user account of local computer to apache service
      •  WampServer:
        1. Run service.msc find the apache service
        2. Right click on that service=> click property
        3. go to Logon tab on window popup
        4. Tick radio button This account: type username and password
        5. Then restart wampapache service
      • XampServer:
   By default when we install xampserver the apache service not install automatically, so we need to
   install service apache manually. By default apache service is point to http.exe.
   So we need to create apache service by point to http.exe like the following.
   Syntax: sc [<ServerName>] create [<ServiceName>] [type= {own | share | kernel | filesys | rec | interact type= {own | share}}] [start= {boot | system | auto | demand | disabled}] [error= {normal | severe | critical | ignore}] [binpath= <BinaryPathName>] [group= <LoadOrderGroup>] [tag= {yes | no}] [depend= <dependencies>] [obj= {<AccountName> | <ObjectName>}] [displayname= <DisplayName>] [password= <Password>]
Ex:
sc \\myserver create NewService binpath= c:\windows\system32\NewServ.exe
sc create NewService binpath= c:\windows\system32\NewServ.exe type= share start= auto depend= “+TDI NetBIOS”
sc XampApache create c:\window\xamp\bin\http.exe
Note: make sure http.exe path is correct.
Advertisements