LINK(3) 1 LINK(3)link - Create a hard linkSYNOPSIS
bool link (string $target, string $link)
DESCRIPTION link(3) creates a hard link.
PARAMETERS
o $target
- Target of the link.
o $link
- The link name.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms (Vista, Server 2008 or greater). |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Creating a simple hard link
<?php
$target = 'source.ext'; // This is the file that already exists
$link = 'newfile.ext'; // This the filename that you want to link it to
link($target, $link);
?>
NOTES
Note
This function will not work on remote files as the file to be examined must be accessible via the server's filesystem.
Note
For Windows only: This function requires PHP to run in an elevated mode or with the UAC disabled.
SEE ALSO symlink(3), readlink(3), linkinfo(3).
PHP Documentation Group LINK(3)
Check Out this Related Man Page
SYMLINK(3) 1 SYMLINK(3)symlink - Creates a symbolic linkSYNOPSIS
bool symlink (string $target, string $link)
DESCRIPTION symlink(3) creates a symbolic link to the existing $target with the specified name $link.
PARAMETERS
o $target
- Target of the link.
o $link
- The link name.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms (Vista, Server 2008 or greater). |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Create a symbolic link
<?php
$target = 'uploads.php';
$link = 'uploads';
symlink($target, $link);
echo readlink($link);
?>
NOTES
Note
Windows users should note that this function will only work if the system you run PHP from is Windows Vista/Windows Server 2008 or
newer. Windows versions prior to that do not support symbolic links.
SEE ALSO link(3), readlink(3), linkinfo(3).
PHP Documentation Group SYMLINK(3)
As I read the source code of unix I wonder where u_ofile(it should be stdout) link to ?
Does it link to a file structure like ordinary files? :confused: (7 Replies)
Hi Guys,
i have this lil challenge;
i am to implement an automated script that searches/scans a directory for files then picks and sends this files to a very remote server via an ftp link.
the challenge here is that the ftp link fails due to netwrk issues maybe;
i therefore need to develop... (5 Replies)
Hi,
Can somebody please help me in knowing the difference between soft (Symbolic) link and hard link.
Please explain it in as simple terms as possible.
Kris (4 Replies)
Hi,
Does anyone know how to increase the link speed on a ce interface? Currently mine is running at 100. I need to increase this to 1000.
# kstat -p ce:0::link*
ce:0:ce0:link_T4 0
ce:0:ce0:link_asmpause 0
ce:0:ce0:link_duplex 2
ce:0:ce0:link_pause 0... (4 Replies)
sorry im very new to this but i am supposed to create 3 processes A,B, and C and have a direct link from a to b, b to c, and c to a.
here is my code. It does work, however if you look at what I bolded as long as my final read is p it seems to always work, regardless of the bolded section.
... (6 Replies)
Can anyone let me know the difference between hard link and copy command..
1) from my knowledge hard link wont span across file system and it will link to inode.
2) But in space point of view both hard link and copying a file occupies a same space. Then what is the major difference between... (11 Replies)
Is it possible to hard link multiple files at the same time? I tried to use wildcards with no luck. This is what I tried.
ln /home/hardlink/* /home/hardlink1 (6 Replies)
Hey,
weird story, dunno if this is actually possible, but here's what happened: My dad's PC (Windows) is completely full of trash, the hard drive is completely full. After the last Windows update he wasn't able to boot anymore, even from a WindowsCD it didn't seem to work. That's at least what... (7 Replies)
Hello,
If I am using the link function to link two outputs (cluster in the same group based on the distance). How can I write them to the same file (if they link)?
Thanks! (4 Replies)
Hi guys,
I need a solution to copy files and folders without using cp-r , cp-R or any variants. So i need to code it manually. I allready have a loop
Avans Highschool Breda the Netherlands
#!bin/bash
IFS=$'\n'
if test "$1" = ""
then
wd=pwd
else
wd=$1
fi
... (7 Replies)
Hey All,
I'm receiving the following error off of a Power5 9133-55A after I write 2-5 files to the LUN:
4B436A3D 0313233216 T H fscsi0 LINK ERROR
I can create the filesystem, volume groups etc etc. All goes well until there is sustained activity to the LUN then the above error... (23 Replies)