search for in the  
<is_writeablelinkinfo>
Last updated: Thu, 19 May 2005

link

(PHP 3, PHP 4, PHP 5)

link -- Create a hard link

Description

bool link ( string target, string link )

link() creates a hard link. Returns TRUE on success or FALSE on failure.

Note: This function will not work on remote files as the file to be examined must be accessible via the servers filesystem.

Note: This function is not implemented on Windows platforms.

See also the symlink() to create soft links, and readlink() along with linkinfo().



User Contributed Notes
link
mmap at upt dot org
15-May-2004 06:28
I think kop is confused regarding the semantics of link's argument order.  The user's comment states that target should not already exist, suggesting that it is the target that is being created.  As with the UNIX hardlink, ln(1), the target is the existing file.  I think kop meant to say php's link() will return an error if the second parameter, the link being created, already exists.

Also, as with the UNIX system call link will fail if the link being created exists on a different filesystem.
kop at meme dot com
25-Sep-2003 04:20
Note that link() will not work if the target already exists, at least as of php 4.1.2.

<is_writeablelinkinfo>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT