IS_LINK(3) 1 IS_LINK(3)is_link - Tells whether the filename is a symbolic linkSYNOPSIS
bool is_link (string $filename)
DESCRIPTION
Tells whether the given file is a symbolic link.
PARAMETERS
o $filename
- Path to the file.
RETURN VALUES
Returns TRUE if the filename exists and is a symbolic link, FALSE otherwise.
EXAMPLES
Example #1
Create and confirm if a file is a symbolic link
<?php
$link = 'uploads';
if (is_link($link)) {
echo(readlink($link));
} else {
symlink('uploads.php', $link);
}
?>
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO is_dir(3), is_file(3), readlink(3).
PHP Documentation Group IS_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)
hi all,
I am trying to ftp and get some symbolic link file as it is instead of getting whatever it is pointing at. Is it do-able?
Thx in advance. (11 Replies)
Hi,
Is there a limit to the number of symbolic links you can have?
I tried to vi the symbolic link relating to a file and got the following error:
"filename" Too many levels of symbolic links
There is only one symbolic link to one file in this case, but there are >2000 other links to... (2 Replies)
I just created a symbolic link to a directory using ln -s </remote-directory> < name>
I just want to get rid of it.
What should I do?
muck thanks,
rkk (3 Replies)
Any idea how to create a symbolic link...for example i want to create a symbolink link for a specific user in his profile to use the df command...?
Thanks in advance (9 Replies)
As much as I love unix, in particular it's derivatives linux and mac, I must say it's a b*** to code software for. I used to maintain a PHP project back in the early 2000s, which I won't link to as I no longer maintain it, and anyway, basically it was a PHP based personal organiser. It worked and... (2 Replies)
Discussion started by: *nixloverman123
2 Replies
6. Post Here to Contact Site Administrators and Moderators
i follow on the https://www.unix.com/cfmgoogle.php?cx=partner-pub-6323928554267084%3Absye1r5tx7j&cof=FORID%3A10&q=solaris&sa=Search#907
https://www.unix.com/sun-solaris/ (4 Replies)
Hi ,
pwd -P will give the physical directory name for symbolic names.
is there any command to get the value of symbolic link ?
if it's symbolic link , I have to get the physical directory name? any ideas to code in shell ?
Thanks (3 Replies)
Does anyone know how can I determine which user is UPLOADING via http protocol? Like sending video on youtube?
Or maybe how to throttle multimedia uploads ? Or any uploads?
maybe get packet size? (9 Replies)
Hello,
I'm trying to move a file using ftp command
rename filename /new/filesystem/filename
but I'm getting the error Cannot link to a file on another device. When it says 'device' what exactly does that mean? Physical or logical? Is there anyway to display and find a suitable drive.
... (3 Replies)
Hello World :)
I want to create a conditional symbolic link in Solaris 10 so that if one destination becomes unavailable it should automatically point to another destination.
e.g. /dump/abc is destination.
/export/home/abc contains a copy of it
symbolic link should be /abc -->... (2 Replies)
Hi all,
Can anyone please confirm if the command below is the only way that I can get what the symbolic link is set to?
mnlxd110(oracle)/db/posd2/dba$: ls -l | grep "^l"
lrwxrwxrwx 1 oracle dba 28 Aug 9 2011 bdump -> diag/rdbms/posp1/posp1/trace
mnlxd110(oracle)/db/posd2/dba$:... (7 Replies)
Hello guys,
I have a simple problem. Do you know any way to get the get the filename linked to symbolic link? I think use "ls -l <myfile> | cut -d '>' -f2", but i know it is a bad practice take information from the output of "ls -l". I dont have "stat" comand neither. :(
Regards!
... (6 Replies)
Hello all,
On a Solaris box, I am trying to move the target of a symbolic link.
Let's say the symbolic link looks like the following:
/dir1/dir2/link -> /some/dir/target
I would like to know of a simple way to move the target of the symbolic link and not the link itself. I'd like to move... (4 Replies)