When I select a file or folder through input field I am not getting the proper path in PHP.
HTML:
<input type="file" name="dirpath" id="dirname" webkitdirectory directory multiple>
PHP code:
if(isset($_FILES['dir']))
{
$name = file_get_contents($_FILES['dir']['tmp_name']);
echo '<pre>';
print_r($name);
}
here, getting fake path like C:\fakepath\123.pdf
but actual File path I want to like this way:
path: "C:\Users\Prashan\Desktop\pdf\123.pdf"
How to find the absolute path of the file?