Current Location: Home> Function Categories> realpath

realpath

Returns the normalized absolute path name
Name:realpath
Category:File system
Programming Language:php
One-line Description:Returns the absolute path name.

Definition and usage

realpath() function returns an absolute path.

This function deletes all symbolic connections (such as '/./', '/../' and redundant '/') and returns the absolute pathname.

If it fails, return false. For example, if the file does not exist.

Example

 <?php
echo realpath ( "test.txt" ) ;
?>

Output:

 C:\Inetpub\testweb\test.txt

grammar

 readlink ( linkpath )
parameter describe
linkpath Required. Specify the connection path to be checked.

illustrate

On BSD systems, if linkpaths are just not present, PHP does not return false like other systems.

Similar Functions
Popular Articles