SplFileInfo::getPathInfo
(PHP 5 >= 5.1.2)
SplFileInfo::getPathInfo — Gets an SplFileInfo object for the path
Descrierea
Gets an SplFileInfo object for the parent of the current file.
Valorile întoarse
Returns an SplFileInfo object for the parent path of the file.
Exemple
Example #1 SplFileInfo::getPathInfo() example
<?php
$info = new SplFileInfo('/usr/bin/php');
$parent_info = $info->getPathInfo();
var_dump($parent_info->getRealPath());
?>
Exemplul de mai sus va afișa ceva similar cu:
string(8) "/usr/bin"
Vedeți de asemenea
- SplFileInfo::setInfoClass() - Sets the class used with getFileInfo and getPathInfo
There are no user contributed notes for this page.
