Logo

realpath()

ops...
Thanks to: ,

Description

Returns canonicalized absolute pathname, or false if it could not be found.

Usage: realpath(string $path): string|false
 
// Will print out "C:\php\program\dmi-data.json"
$filename = "dmi-data" . '.json';
file_put_contents($filename);
echo realpath($filename);