I am doing one project, in which I want to access the folders from remote system connected via LAN.
From that I have a drop down list. When I select the remote system drive letter (eg: c:, d:) the corresponding files in that folder will displayed in my system.
Is there any tutorial for this?
I've tried this, but it works for local system only and also I am not able to open the corresponding files.
<html>
<head>
<title>Drive contents</title>
</head>
<body>
</body>
<?php // Php starts here
$myDirectory = opendir("C:\Dream");
$path = "c:";
// get each entry
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}
// close directory
closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
Print ("$indexCount files<br>\n");
// sort 'em
sort($dirArray);
// print 'em
// loop through the array of files and print them all
for($index=0; $index < $indexCount; $index++) {
if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files
print("<a href=\"$dirArray[$index]\">$dirArray[$index]</a>");
echo "<br>";
}
}
?>
</html>