PHP is_link() Function

PHP lchgrp() Function
PHP is_writable() Function

In this article, you will learn how to check if the name of the file is a symbolic link or not. The is_link() function in PHP checks whether the specified filename is a symbolic link.

what is the syntax of the IS_LINK function in php?

is_link(file)
ParameterDescription
fileRequired. Specifies the path to the file to check
PHP is_link() method

examples of the IS_LINK function

Example 1. In this example, we check whether the specified filename is a symbolic link.

<?php
$link = "images";
if(is_link($link)) {
  echo ("$link is a link");
} else {
  echo ("$link is not a link");
}
?>
PHP lchgrp() Function
PHP is_writable() Function
en English
X
Scroll to Top