PHP在验证失败后保留用户的文件上传路径 [英] PHP Keep the User's File Upload Path After Validation Fail

查看:152
本文介绍了PHP在验证失败后保留用户的文件上传路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下,如果可以保留用户的上传路径,他可以从他的电脑中选择上传哪个文件,如路径C:\ Users \ User1\Desktop\1.jpg ,我想了解这个的原因是在提交表单后,当他失败的验证,我希望他不重新选择它..

i want to ask that if its possible to keep the user's upload path where he selects from his computer that which file will be uploaded like the path " C:\Users\User1\Desktop\1.jpg " , the reason i want to learn about this is after submitting forms with php when he fails about validation, i want him to not reselect it..

总结:我怎么能保存路径:C:\Users\User1\Desktop\1.jpg以用户的形式,如果用户失败其他字段的验证

Summary : How can i save the path : C:\Users\User1\Desktop\1.jpg in user's form if user fails on other field's validation

谢谢

推荐答案

这是不可能的。只有文件名是由浏览器发送的,而不是完整的路径。

It is not possible. Only the filename is sent by the browser, not the full path.

这篇关于PHP在验证失败后保留用户的文件上传路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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