Realpath in php

By | January 31, 2014

Returns the absolute path name.

Syntax: string realpath(string $path)

realpath() expands all symbolic links and resolbes references to ‘/./’ ,’/../’ and extra ‘/’ characters in the input path and returns the canonical absolute pathname

example
——-

Out put of the above as below

/test/hello

on windows realpath will change unix style paths to windows style

C:\windows\system32