English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
realpath() returns the normalized absolute path name. This function can remove all symbolic links (such as /./”/../" and unnecessary /)and returns the absolute path name. This function returns false on failure.
string realpath ( string $path )
realpath() expands all symbolic links and handles the quotes in the input path '/./', '/../And unnecessary/And returns the normalized absolute path name. The returned path does not contain symbolic links,/./Or/../Component.
<?php echo $real_path = realpath("C:/PhpProject/index.php()); ?>
Output Result
C:\PhpProject\index.php