Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to use link() function in php ?
Basically the link() function is used for creating a hard link from the existing target with the specified name link.
The link() function always returns TRUE on success and FALSE on failure.
syntax of link() function
link(target,link)
There are two main parameter in above syntax and both are required parameter.
you can see below example
<?php
//here define variable oa a file which is already exists
$target_file = 'file.txt';
// This the filename that you want to link it to
$link_file = 'newf_file.txt';
//here call link() function
link($target_file, $link_file);
?>
0 Comment(s)