Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

link

Description

The link of Filesystem for PHP create a hard link.

Syntax

link(
    string $target,
    string $link
): bool

Parameters

target

Target of the link.

The link name.

Return

Returns true on success or false on failure.

Examples

<?

$target = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$link = 'link.html';

$return = link($target, $link);

var_export($return);

unlink($link);

?>
true

2 · readfile

<?

$target = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$link = 'link.html';

link($target, $link);

readfile($link);

unlink($link);

?>
hello
HomeMenu