Home > php教程 > php手册 > php文件上传$_FILES move_uploaded_file详细说明

php文件上传$_FILES move_uploaded_file详细说明

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-25 16:57:09
Original
1587 people have browsed it

第一种比较简单就是files利用index.php教程接入值就成了,没经过判断,都会用到move_uploaded_files与files[]全局变量如下

第一个参数是表单的 input name,第二个下标可以是 "name", "type", "size", "tmp_name" 或 "error"。就像这样:

$_files["file"]["name"] - 被上传文件的名称
$_files["file"]["type"] - 被上传文件的类型
$_files["file"]["size"] - 被上传文件的大小,以字节计
$_files["file"]["tmp_name"] - 存储在服务器的文件的临时副本的名称
$_files["file"]["error"] - 由文件上传导致的错误代码
这是一种非常简单文件上传方式。基于安全方面的考虑,您应当增加有关什么用户有权上传文件的限制

 

Copy after login
      缩略图:            
  
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template