Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

is_link()

Example

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

Definition and Usage

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().

Syntax

is_link(file)

Parameter Values

 

Parameter

Description

file

Essential. gives the location of the file to be checked.

Technical Details

Return Value:

In the event that the file is a symbolic link, TRUE; otherwise, FALSE and an E_WARNING

PHP Version:

4.0+