如何在不使用QueryString的输入类型的情况下上传文件 [英] How to upload file without using input-type using QueryString

查看:77
本文介绍了如何在不使用QueryString的输入类型的情况下上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要上传文件而不使用上传控件,然后在queryString中给出文件路径。

Ex:(http://somesite.com/fileup.php?file=d:/folder1/file1.png)



任何可能性都有帮助我PLZ。



提前谢谢.....!

解决方案

< blockquote>这不起作用,因为像d:/folder1/file1.png这样的路径是浏览器(用户)的本地路径,并且Web服务器无法访问。如果可能的话,这将是一个重大的安全风险。



祝你好运!


找出正确的方法在php上传文件来自

PHP 5文件上传 [ ^ ]


由于安全原因!这就是为什么表单控件不会将文件的完整路径发送到服务器(只发送文件名)。


I need to upload file without using upload control, then the file path is given in queryString.
For Ex: (http://somesite.com/fileup.php?file=d:/folder1/file1.png)

Any possibilities is there means help me plz.

Thanks in advance.....!

解决方案

This wouldn't work because a path like "d:/folder1/file1.png" is local to the browser (user) and not accessible for the web-server. It would be a major security risk if something like that would be possible.

Good luck!


Find out the proper way of uploading file in php from
PHP 5 File Upload[^]


It's not possible because of security reasons! And that is why the "form control" doesn't send the full path of the file to the server (just the file name is sent).


这篇关于如何在不使用QueryString的输入类型的情况下上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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