file_is_valid_image()
file_is_valid_image( string $path )
验证文件是否为图像。
Validate that file is an image.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$path | (string) | 必需 | 要测试图像是否有效的文件路径。 |
返回(Return)
(bool)如果图像有效,则为True;如果图像无效,则为false。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.5.0 | wp-admin/includes/image.php:873 | 0 | 0 |
file_is_valid_image() 为WP2原创文章,链接:https://www.wp2.cn/functions/file_is_valid_image/