SplFileInfo::__construct
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::__construct — 构造新的 SplFileInfo 对象
说明
为指定 file_name 创建新的 SplFileInfo 对象。该文件不需要存在或者可读。
参数
filename
-
文件路径。
示例
示例 #1 SplFileInfo::__construct() 示例
<?php
$info = new SplFileInfo('example.php');
if ($info->isFile()) {
echo $info->getRealPath();
}
?>
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/splfileinfo.construct.php