Created
March 11, 2015 14:28
-
-
Save bytefade/159ca2e75bd6a68a7d51 to your computer and use it in GitHub Desktop.
Except files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$except = array("rar", "zip", "mp3", "mp4", "mp3", "mov", "flv", "wmv", "swf", "png", "gif", "jpg", "bmp", "avi"); | |
$imp = implode('|', $except); | |
foreach($files as $file) | |
{ | |
if(preg_match('/^.*\.('.$imp.')$/i', $file)) | |
echo $file; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment