SplFileInfo::getRealPath
En esta página
SplFileInfo::getRealPath
Obtiene la ruta absoluta al fichero
Descripción#
public SplFileInfo::getRealPath(): string
```php
Este método expande todos los enlaces simbólicos, resuelve las referencias relativas y retorna la ruta real al fichero.
## Parámetros
Esta función no contiene ningún parámetro.
## Valores devueltos
Devuelve la ruta al fichero, o `false` si el fichero no existe.
## Ejemplos
Ejemplo de `SplFileInfo::getRealPath`
```php
Resultado del ejemplo anterior es similar a:
string(28) "/private/tmp/phptempfile.php"
string(12) "/private/tmp"
bool(false)
bool(false)
string(12) "/private/tmp"
Véase también#
SplFileInfo::isLink, realpath