PHP realpath() Function

PHP realpath_cache_get() Function
PHP readlink() Function

In this article, you will learn how to get the real or absolute pathname of the destination in PHP. The realpath() function in PHP returns the absolute pathname. No symbolic link is present in the output.

what is the syntax of the REALPATH function in php?

realpath(path)
ParameterDescription
pathRequired. Specifies the path to check
PHP REALPATH() method

examples of the REALPATH function

Example 1. In this example, we returns the absolute pathname.

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

// Output
C:\Inetpub\testweb\test.txt
PHP realpath_cache_get() Function
PHP readlink() Function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top