SplFileInfo::__construct
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::__construct — 构建一个新的 SplFileInfo 对象
说明
public SplFileInfo::__construct(string
$file_name
)为指定的 file_name 创建一个新的 SplFileInfo 对象,该文件不需要存在或者可读。
参数
-
file_name
-
文件路径
范例
示例 #1 SplFileInfo::__construct() 示例
<?php
$info = new SplFileInfo('example.php');
if ($info->isFile()) {
echo $info->getRealPath();
}
?>

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/splfileinfo.construct.php