PHP is_link() Function
Definition
The is_link() function checks whether the specified file is a link.
Syntax
PHP is_link() Function has the following syntax.
is_link(file)
Parameter
Parameter | Is Required | Description |
---|---|---|
file | Required. | File to check |
Return
This function returns TRUE if it is a link.
Note
The result of this function are cached. Use clearstatcache() to clear the cache.
Example
<?php/* w ww . java 2s .c o m*/
$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.