mirror of
				https://github.com/jcampbell1/simple-file-manager.git
				synced 2025-02-20 22:00:04 +01:00 
			
		
		
		
	Option to hide exntensions into list added
This commit is contained in:
		| @@ -17,6 +17,8 @@ $allow_direct_link = true; // Set to false to only allow downloads and not direc | |||||||
|  |  | ||||||
| $disallowed_extensions = ['php'];  // must be an array. | $disallowed_extensions = ['php'];  // must be an array. | ||||||
|  |  | ||||||
|  | $hidden_extensions = ['php']; // must be an array. | ||||||
|  |  | ||||||
| $PASSWORD = '';  // Set the password, to access the file manager... (optional) | $PASSWORD = '';  // Set the password, to access the file manager... (optional) | ||||||
|  |  | ||||||
| if($PASSWORD) { | if($PASSWORD) { | ||||||
| @@ -59,7 +61,7 @@ if($_GET['do'] == 'list') { | |||||||
| 		$directory = $file; | 		$directory = $file; | ||||||
| 		$result = []; | 		$result = []; | ||||||
| 		$files = array_diff(scandir($directory), ['.','..']); | 		$files = array_diff(scandir($directory), ['.','..']); | ||||||
| 	    foreach($files as $entry) if($entry !== basename(__FILE__)) { | 	    foreach($files as $entry) if($entry !== basename(__FILE__) && !in_array(strtolower(pathinfo($entry, PATHINFO_EXTENSION)), $hidden_extensions)) { | ||||||
|     		$i = $directory . '/' . $entry; |     		$i = $directory . '/' . $entry; | ||||||
| 	    	$stat = stat($i); | 	    	$stat = stat($i); | ||||||
| 	        $result[] = [ | 	        $result[] = [ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user