file_is_valid_image()

最后更新于:2021-11-26 04:06:14

file_is_valid_image( string$path)

Validate that file is an image.

参数

$path

(string) (Required) File path to test if valid image.

响应

(bool) True if valid image, false if not valid image.

源文件

文件: gc-admin/includes/image.php

function file_is_valid_image( $path ) {
	$size = gc_getimagesize( $path );
	return ! empty( $size );
}