PHP is_link()Functions
Complete PHP Filesystem Reference Manual
Definition and Usage
The is_link() function checks whether the specified file is a link.
If the file is a link, the function returns TRUE.
Syntax
is_link(file)
| Parameters | Description |
|---|---|
| file | Required. Specifies the file to check. |
Tips and Notes
Note:The result of this function is cached. Use clearstatcache() to clear the cache.
Examples
<?php
$link = "images";
if(is_link($link))
{
echo ("$link is a link");
}
else
{
echo ("$link is not a link");
}
?>
$link = "images";
if(is_link($link))
{
echo ("$link is a link");
}
else
{
echo ("$link is not a link");
}
?>
The above code will output:
images is not a link
Complete PHP Filesystem Reference Manual Other Extensions