symlink

bool symlink(string target, string source) 

Creates a symbolic link.

Returns:

TRUE on success; FALSE on error

Description:

symlink() creates a symbolic link, if permissions allow, from the source file to the target file. This function doesn’t work on Windows platforms.

Example:

Create a symbolic link
$path = "/home/user/orig_file"; 
$path_new = "/home/user/link_file"; 

symlink($path_new, $path); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.