Last active
April 23, 2018 06:39
-
-
Save Guley/04f61f99ba926d93606a678cecbc7ce7 to your computer and use it in GitHub Desktop.
Check if image is corrupted using php
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
$tempFile = $_SERVER["DOCUMENT_ROOT"]. 'images/image.jpeg'; | |
$im = @imagecreatefromjpeg($tempFile); | |
if(empty($im)){ | |
return false; | |
}else{ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment