github 上函数的未知参数

Unknown argument on a function on github

我在 github 上找到了一个使用 php 上传图片的好函数,但我不知道它的参数之一。

upload_image($_FILES,'file',250,'city',500,'../../uploaded/',1048576);

Function on Github

  1. 这个函数中的'file'是什么?
  2. 这是我网站上使用的可信功能吗?

考虑 the lines:

$file[$fileIndex]['tmp_name']
$file[$fileIndex]['error']
$file[$fileIndex]['name']
$file[$fileIndex]['type']
$file[$fileIndex]['size']

$filea three-dimensional array,由nametmp_nametypesizeerror的数组组成.
这是您在 uploading files in PHP.

时看到的那种数组

它调用 move-uploaded-file,将上传的文件移动到新位置。

This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism).
If the file is valid, it will be moved to the filename given by destination.