Strahan Posted February 9, 2014 Share Posted February 9, 2014 Hi. I have a machine that has content on several drives. For example, lets say I am referring to E:\Videos\SomeShow. The machine has a share, \\machine\video2$ that points to E:\Videos. I have an intranet page that I use for managing and launching my content. It has a function as such: function num_files($dir, $onlyvideo = false) { global $ArchiveTypes, $VideoTypes; $counter = 0; if(is_dir($dir)) { if (file_exists($dir)) { if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if ($onlyvideo) { if (ValidFiles($file, $VideoTypes)) $counter++; } else { if (ValidFiles($file, $ArchiveTypes)) $counter++; } } } closedir($handle); } } } return $counter; } When that code runs and I pass it "//machine/video2$/someshow", it correctly returns the file count. Now.. in order to prevent having the annoyance of having to track my video shares across multiple drives and multiple machines, I made a DFS root called "//domain.com/videos". I have a script that runs daily and manages the DFS links to that root my scanning the folders in each drive share. Works great. However.. I have found that if I pass that function "//domain.com/videos/someshow" I get: Warning: opendir(//domain.com/videos/someshow,//domain.com/videos/someshow): Access is denied. (code: 5) in D:\Sites\domain.com\media\RootLibrary.php on line 447 I was wondering why it listed the path twice, so just to be sure it was passed correctly I echoed it out just before the opendir and it is correct. Is there some way around that? Thanks! Link to comment https://forums.phpfreaks.com/topic/286076-cannot-opendir-on-a-dfs-path/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.