Unix and Linux Discussions Tagged with symbolic link |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
6 |
5,573 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
3,648 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
7,890 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
3,555 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
3,204 |
Web Development |
|
|
|
1 |
4,089 |
Shell Programming and Scripting |
|
|
|
6 |
26,509 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
17,782 |
UNIX for Dummies Questions & Answers |
|
|
|
13 |
10,604 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
18,954 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
20,127 |
UNIX for Dummies Questions & Answers |
|
|
|
11 |
13,310 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,663 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,290 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
15,096 |
UNIX for Dummies Questions & Answers |
|
|
|
11 |
7,918 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
18,600 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
36,961 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
17,905 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,244 |
UNIX for Dummies Questions & Answers |
|
|
|
18 |
8,137 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
8,560 |
UNIX for Dummies Questions & Answers |
IS_LINK(3) 1 IS_LINK(3)
is_link - Tells whether the filename is a symbolic link
SYNOPSIS
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)