Home > Backend Development > PHP Tutorial > is_uploaded_file

is_uploaded_file

WBOY
Release: 2016-06-23 14:20:47
Original
1125 people have browsed it

 is_uploaded_file ( string filename)


 如果 filename 所给出的文件是通过 HTTP POST 上传的则返回 TRUE。这可以用来确保恶意的用户无法欺骗脚本去访问本不能访问的文件,例如 /etc/passwd。

 这种检查显得格外重要,如果上传的文件有可能会造成对用户或本系统的其他用户显示其内容的话。

=====
完全没看明白上面的逻辑。。。。
恶意用户欺骗脚本访问/etc/passwd跟upload有啥关系?有谁讲下细节不


回复讨论(解决方案)

见  http://bbs.csdn.net/topics/390030489#post-391168427

Related labels:
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