上传后获取服务器上文件的客户端路径

enter image description here

I want to know the REALPATH of selected file. Like I uploaded the image. I want to know F:\ubuntu\Ubuntu.ico.

This is my code:

<pre>
<?php
print_r($_FILES);
?>
</pre>

<form method="post" action="" enctype="multipart/form-data">
    <input type="file" name="fupload" id="fupload" />
    <input type="submit" value="Upload" />
</form>

Output:

Array
(
    [fupload] => Array
        (
            [name] => Ubuntu.ico
            [type] => image/x-icon
            [tmp_name] => D:\xampp\tmp\php89.tmp
            [error] => 0
            [size] => 1150
        )

)

You can't know the full path on the client system. Most browsers simply do not expose that information to webpages. Giving that information can expose information about the client system (e.g. usernames, installed software packages) and the usecases for the server knowing the path are very rare.

is it relevant to have the file? because if you omit enctype (uses the default) and do print_r($_POST), you got the full name as type=file is managed as type=input