realpath

(PHP 4 >= 4.0.0)

realpath -- Retourne le chemin canonique absolu.

Description

string realpath (string path)

realpath() résoud tous les liens symboliques, et remplace toutes les références '/./', '/../' et '/' de path puis retourne le chemin canonique absolu ainsi trouvé. Le résultat ne contient aucun lien symbolique, '/./' ou '/../'.

Exemple 1. Exemple realpath()

<?php
  $real_path = realpath("../../index.php");
?>