The is_link() function checks whether the specified file is a link.
If the file is a connection, this function returns TRUE.
is_link(file)
| parameter | describe |
|---|---|
| file | Required. Specifies the documents to be checked. |
Note: The results of this function will be cached. Please 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 above code will output:
images is not a link