PHP link() Function

❮ PHP Filesystem Reference

Example

Create a hard link:

<?php
$target = "text.txt";
$linkname = "mylink";

link($target, $linkname);
?>


Definition and Usage

The link() function creates a hard link.

Syntax

link(target, link)

Parameter Values

Parameter Description
target Required. Specifies the target
link Required. Specifies the name of the link


Technical Details

Return Value: TRUE on success, FALSE on failure
PHP Version: 4.0+
PHP Changelog: PHP 5.3.0: Now available on Windows platforms

❮ PHP Filesystem Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.