Home  >  Article  >  Backend Development  >  link() function in PHP

link() function in PHP

王林
王林forward
2023-09-05 18:45:031698browse

link() function in PHP

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

link() function returns TRUE when successful and FALSE when failed.

Example

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

Output

True

The above is the detailed content of link() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete