A symlink (or soft link) is a built-in function in PHP used to create a symbolic link for an existing target.
The symlink function creates a specific name link for the existing target. The target and link names are sent as parameters to the symlink function, returning True on success and False on failure. It is not an HTML link but a link in the file system.
Syntax:
symlink(target, link)
Parameters used:
The symlink function in PHP accepts two parameters.
- Target: It is a mandatory parameter which specifies the target whose link has to be created.
- Link: It is a mandatory parameter which specifies the link name.
In that case, the symlink is a shortcut to your file manager’s existing directory or file. Therefore, it can be helpful for easier access to files within different locations inside your account.