Jump to content

scandir client's directory


homer.favenir

Recommended Posts

hi,

how can i scandir or read the files of a client's folder.

the client have a shared folder and i want my program to scan it for files

$dir = "\\\\".$_SERVER["REMOTE_ADDR"]."\\NewFolder";
$dir = scandir($dir);
foreach($dir as $item){
echo $item."<br>";
}

 

TIa

Link to comment
https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/
Share on other sites

and im wondering when i use computer name (hardcoded) it can see the directory of the client, but with ip address it didnt.

 

but, when i use this script it gives me different computer name...

echo $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])."<br>"; 
echo $_SERVER['REMOTE_ADDR']

 

not my real computer name i dont know why and how...

 

please advice

 

TIA

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.