PHP Doku:: Get path of current Iterator item without filename - directoryiterator.getpath.html

Verlauf / Chronik / History: (4) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStandard PHP Library (SPL)IteratorenThe DirectoryIterator classDirectoryIterator::getPath

Ein Service von Reinhard Neidl - Webprogrammierung.

The DirectoryIterator class

<<DirectoryIterator::getOwner

DirectoryIterator::getPathname>>

DirectoryIterator::getPath

(PHP 5)

DirectoryIterator::getPathGet path of current Iterator item without filename

Beschreibung

public string DirectoryIterator::getPath ( void )

Get the path to the current DirectoryIterator item.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns the path to the file, omitting the file name and any trailing slash.

Beispiele

Beispiel #1 DirectoryIterator::getPath() example

<?php
$iterator 
= new DirectoryIterator(dirname(__FILE__));
echo 
$iterator->getPath();
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

/home/examples/public_html

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)