link()function in PHP

PHPProgrammingServer Side Programming

Use the link() function in PHP to create a hard link.

Syntax

link(target, link)

Parameters

  • target − The target of the link. Required.

  • link − The name of the link. Required.

Return

The link() function returns TRUE on success or FALSE on failure.

Example

<?php
   $file = 'new.php';
   $newlink = 'mynew';
   link($file, $newlink);
?>

Output

True
raja
Published on 04-Oct-2018 11:42:55
Advertisements