如何获取上传文件的客户端路径 [英] how to get client side path of the uploded file

查看:604
本文介绍了如何获取上传文件的客户端路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个上传文件的表单,我需要获取文件的客户端路径?

服务器路径我可以从php数组获得$ _FILES

I have a form that uploads files, i need to get client side path to file?
server path i could get from php array $_FILES

$_FILES["UploadFileName"]["tmp_name"]

如何获取存储在客户端计算机上的文件的客户端路径?

how to get client side path to file stored on a client computer?

<form method="POST" action="upload.php" enctype="multipart/form-data">
    <p>File to upload : <input type ="file" name = "UploadFileName"></p><br />
    <input type = "submit" name = "Submit" value = "Press THIS to upload">
</form>


推荐答案

你不能。这是一个安全问题,浏览器不会向您提供。

You can't. That's a security matter and the browsers will not provide that to you.

这篇关于如何获取上传文件的客户端路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆