©
本文檔使用 php中文網手册 發布
(PHP 5 >= 5.1.2)
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.
此函数没有参数。
Returns TRUE
if the file is a link, FALSE
otherwise.
Example #1 SplFileInfo::isLink() example
<?php
$info = new SplFileInfo ( '/path/to/symlink' );
if ( $info -> isLink ()) {
echo 'The real path is ' . $info -> getRealPath ();
}
?>