array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'splfileinfo.islink.php', 1 => 'SplFileInfo::isLink', 2 => 'Tells if the file is a link', ), 'up' => array ( 0 => 'class.splfileinfo.php', 1 => 'SplFileInfo', ), 'prev' => array ( 0 => 'splfileinfo.isfile.php', 1 => 'SplFileInfo::isFile', ), 'next' => array ( 0 => 'splfileinfo.isreadable.php', 1 => 'SplFileInfo::isReadable', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splfileinfo/islink.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::isLink — Tells if the file is a link
Use this method to check if the file referenced by the SplFileInfo object is a link.
У цієї функції немає параметрів.
Приклад #1 SplFileInfo::isLink() example
<?php
$info = new SplFileInfo('/path/to/symlink');
if ($info->isLink()) {
echo 'The real path is '.$info->getRealPath();
}
?>