PHP link() Function
❮ PHP Filesystem ReferenceExample
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