如何在文件上传控件中访问整个文件路径? [英] How to access the entire file path in file upload control?

查看:45
本文介绍了如何在文件上传控件中访问整个文件路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网页中,当我浏览并选择文件时,我使用了Fileupload控件,我必须将整个文件路径保存到我的数据库中。

解决方案

< blockquote>你不能这样做,这是一个不能违反的互联网安全规则!



无论如何,文件路径是相对于客户端计算机的,一旦文件上传到Web服务器就不再相关了。


In my webpage i have used a Fileupload control when i browse and opt a file, i have to take the entire file path and save it to my database.

解决方案

You cannot do this, this is a internet security rule that cannot be violated!

Anyway the file path is relative to the client computer, and once the file is uploaded to the web server it is no longer relevant.


这篇关于如何在文件上传控件中访问整个文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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