array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'splfileinfo.getpathname.php', 1 => 'SplFileInfo::getPathname', ), 'up' => array ( 0 => 'class.splfileinfo.php', 1 => 'SplFileInfo', ), 'prev' => array ( 0 => 'splfileinfo.getpathinfo.php', 1 => 'SplFileInfo::getPathInfo', ), 'next' => array ( 0 => 'splfileinfo.getperms.php', 1 => 'SplFileInfo::getPerms', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/spl/splfileinfo/getpathname.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::getPathname — ファイルへのパスを取得する
この関数にはパラメータはありません。
ファイルへのパスを返します。
例1 SplFileInfo::getPathname() の例
<?php
$info = new SplFileInfo('/usr/bin/php');
var_dump($info->getPathname());
?>
上の例の出力は、 たとえば以下のようになります。
string(12) "/usr/bin/php"