• PHP Video Tutorials

PHP - Function is_link()



The is_link() function can check whether a specified file is a link. If the file is a connection, then it can return true.

Syntax

bool is_link ( string $filename )

This function can return true if the filename exists and is a symbolic link, false otherwise.

Example

<?php
   $link = "/PhpProject/images";
   if(is_link($link)) {
      echo ("$link is a link");
   } else {
      echo ("$link is not a link");
   }
?>

Output

/PhpProject/images is not a link
php_function_reference.htm
Advertisements