English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The is_link() function can check if the specified file is a symbolic link. It returns TRUE if the file exists and is a symbolic link, otherwise it returns FALSE.
bool is_link ( string $filename )
This function can return true if the filename exists and is a symbolic link, otherwise it returns false.
<?php $link = "/PhpProject/images"; if(is_link($link)) { echo ("$link is a link"); } else { echo ("$link is not a link"); } ?>
Output Result
/PhpProject/images is not a link