PHP-Fusion Development

verify_image()

Scan image files for malicious code.

Versions: 9

verify_image( string $file ) : bool

Parameters

$file (string) (Required) Path to image.

Return Values

(bool) True or false, depending on whether the image is safe or not.

Examples

$file = IMAGES.'php-fusion-logo.png';
if (verify_image($file)) {
echo 'The image is safe.';
} else {
echo 'The image is not safe.';
}
// The image is safe.