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
  • Export buffered content to file fflush

    fflush

    Exportbufferedconten
  • Get file information through the opened file pointer fstat

    fstat

    Getfileinformationth
  • Returns the file path information pathinfo

    pathinfo

    Returnsthefilepathin
  • Read a line from a file pointer and filter out HTML tags fgetss

    fgetss

    Readalinefromafilepo
  • Determine whether the given file name is a symbolic connection is_link

    is_link

    Determinewhethertheg
  • Read the entire file into an array file

    file

    Readtheentirefileint
  • alias for disk_free_space diskfreespace

    diskfreespace

    aliasfordisk_free_sp
  • Give information about a file or symbol connection lstat

    lstat

    Giveinformationabout
Popular Articles