The symlink() function creates a symbolic link. It returns TRUE on success or FALSE on failure.
Syntax
symlink( target, link)
Parameters
target − Target of the link to be created.
link − Name of the link.
Return
The symlink() function returns TRUE on success or FALSE on failure.
Example
<?php $target = new.php'; $mylink = new.html'; $res = symlink($target, $mylink); if ($result) { echo ("Symlink created!"); } else { echo ("Symlink can’t be created!"); } ?>
Output
Symlink created!