realpath() function in PHP


The realpath() function returns the absolute pathname. It returns the absolute pathname on success and False on failure.

Syntax

realpath(path)

Parameters

  • path − The path to check. Required.

Return

The realpath() function returns the absolute pathname on success and False on failure.

Example

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

Output

D:\tutorials\java
ew.txt

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 24-Jun-2020

34 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements