PHP-Fusion Development

image_exists()

Find another available image name based on the image in the folder.

Versions: 9

image_exists( string $dir, string $image ) : string

Parameters

$dir (string) (Required) The directory to check for the image, remember a / at the end of the directory path.

$image (string) (Required) The image inside the directory you want to check for.

Return Values

(string)

Examples

require_once INCLUDES.'photo_functions_include.php';
‚Äč
echo image_exists(IMAGES, 'php-fusion-icon.png');
// php-fusion-icon_1.png