Created
September 23, 2022 12:15
-
-
Save alivx/f177ec7fd32ca837acd26aa4c5f8feff to your computer and use it in GitHub Desktop.
Check installed php Image support
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
<?php | |
function check_image_support() | |
{ | |
echo 'Checking Image Support: '."\n"; | |
//IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM | |
if (imagetypes() & IMG_GIF) | |
echo "GIF: \tYes"; | |
else | |
echo "GIF: \tNo"; | |
echo "\n"; | |
if (imagetypes() & IMG_JPG) | |
echo "JPG: \tYes"; | |
else | |
echo "JPG: \tNo"; | |
echo "\n"; | |
if (imagetypes() & IMG_PNG) | |
echo "PNG: \tYes"; | |
else | |
echo "PNG: \tNo"; | |
echo "\n"; | |
if (imagetypes() & IMG_WBMP) | |
echo "WBMP: \tYes"; | |
else | |
echo "WBMP: \tNo"; | |
echo "\n"; | |
if (imagetypes() & IMG_XPM) | |
echo "XPM: \tYes"; | |
else | |
echo "XPM: \tNo"; | |
echo "\n"; | |
echo "Support Check Complete\n"; | |
return; | |
} | |
check_image_support() | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment