homer.favenir Posted November 4, 2009 Share Posted November 4, 2009 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 More sharing options...
trq Posted November 4, 2009 Share Posted November 4, 2009 If you have a valid shared directory and sufficient permissions I don't see why that code wont work. Link to comment https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/#findComment-950826 Share on other sites More sharing options...
homer.favenir Posted November 4, 2009 Author Share Posted November 4, 2009 it has an error Warning: scandir(//192.168.200.109/NewFolder/) [function.scandir]: failed to open dir: No error in C:\xampp\htdocs\laboratory\scandir.php on line 30 Link to comment https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/#findComment-950828 Share on other sites More sharing options...
homer.favenir Posted November 4, 2009 Author Share Posted November 4, 2009 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 Link to comment https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/#findComment-950841 Share on other sites More sharing options...
trq Posted November 4, 2009 Share Posted November 4, 2009 I'm really not windows savy enough to be of more help. Link to comment https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/#findComment-950859 Share on other sites More sharing options...
homer.favenir Posted November 5, 2009 Author Share Posted November 5, 2009 anyone knows how to copy files from client to server... a shared folder will be copied to a server... TIA Link to comment https://forums.phpfreaks.com/topic/180246-scandir-clients-directory/#findComment-951485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.