Browse Source

Upload files to 'Photo'

Yeung Alan 5 năm trước cách đây
mục cha
commit
c98697b926
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      Photo/Image_manager.php

+ 5 - 1
Photo/Image_manager.php

@@ -35,7 +35,11 @@ if(isset($_GET["bkend"])){
 			$dirs = array_merge($IntDirWInfo,$ExtDirWInfo);
 			echo json_encode($dirs);
 		}else if($_GET["query"] == "storage"){
-			$extdirs = array_filter(glob("/media/*"), 'is_dir');
+			if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+				$extdirs = [];
+			}else{
+				$extdirs = array_filter(glob("/media/*"), 'is_dir');
+			}
 			$dirs = array_merge($extdirs,["internal"]);
 			echo json_encode($dirs);
 		}else if($_GET["query"] == "unsort"){