Created
September 30, 2016 20:32
-
-
Save yavir-me/4637b603ce6c66baed3c43bebf5eaf27 to your computer and use it in GitHub Desktop.
check extensions of all the files
This file contains 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
if (count($_FILES)) { | |
foreach ($_FILES as $file) { | |
$tmp = explode('.', $file['name']); | |
$ext = end($tmp); | |
if ($this->inArrayI($ext, $this->img_exts)) { | |
// do smth | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment