Home > Backend Development > PHP Tutorial > 文件上传输入框的value值有没有意义?

文件上传输入框的value值有没有意义?

WBOY
Release: 2016-06-23 13:50:27
Original
1031 people have browsed it

" />  
这里的value值有意义吗?POST提交表单时能获取到它的值吗?


回复讨论(解决方案)

设定初始值没有用,但如果是选择了文件的,那就能用$_POST获取到value的内容。

没有意义,因为 input type="file" 是只读的

如果只是想在提交的时候获取它的值,可以改用hidden隐藏标签

value可以用来js判断是否上传图片,还是有点用的,

没有意义,因为 input type="file" 是只读的

谢谢
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template