PHP realpath() Functie
❮ Referentie voor PHP-bestandssysteemVoorbeeld
Retourneert de absolute padnaam:
<?php
echo realpath("test.txt");
?>
De uitvoer van de bovenstaande code zal zijn:
C:\Inetpub\testweb\test.txt
Definitie en gebruik
De functie realpath() retourneert de absolute padnaam.
Deze functie verwijdert alle symbolische links (zoals '/./', '/../' en extra '/') en retourneert de absolute padnaam.
Syntaxis
realpath(path)
Parameterwaarden
Parameter | Description |
---|---|
path | Required. Specifies the path to check |
Technische details
Winstwaarde: | De absolute padnaam bij succes, ONWAAR bij mislukking |
---|---|
PHP-versie: | 4.0+ |
PHP-wijzigingslogboek: | PHP 5.3: PHP 5.2.1: |
❮ Referentie voor PHP-bestandssysteem