symlink
Creates a symbolic link
Description
bool symlink(string $target
, string $link
)
Parameters
-
target
-
Target of the link.
-
link
-
The link name.
Return Values
Returns true
on success or false
on failure.
Errors/Exceptions
The function fails, and issues E_WARNING
,
if link
already exists.
On Windows, the function also fails, and issues E_WARNING
,
if target
does not exist.
Examples
Example #1 Create a symbolic link
<?php
$target = 'uploads.php';
$link = 'uploads';
symlink($target, $link);
echo readlink($link);
?>
See Also
- link
- readlink
- linkinfo
- unlink