The is_link() function checks whether the specified file is a link.
PHP is_link() Function has the following syntax.
is_link(file)
Parameter | Is Required | Description |
---|---|---|
file | Required. | File to check |
This function returns TRUE if it is a link.
The result of this function are cached. Use clearstatcache() to clear the cache.
<?php
$link = "images";
if(is_link($link)){
echo ("$link is a link");
}else{
echo ("$link is not a link");
}
?>
The code above generates the following result.