Verify if the filename provided is a symbolic link:
| <?php $link = “images”; if(is_link($link)) { echo (“$link is a link”); } else { echo (“$link is not a link”); } ?> |
What the code above might produce is:
| images is not a link |
The function is_link() determines if the filename provided is a symbolic link or not.
Note: This function caches its output. To clear the cache, use clearstatcache().
| is_link(file) |
|
Parameter |
Description |
|
file |
Essential. gives the location of the file to be checked. |
|
Return Value: |
In the event that the file is a symbolic link, TRUE; otherwise, FALSE and an E_WARNING |
|
PHP Version: |
4.0+ |