github 上函数的未知参数
Unknown argument on a function on github
我在 github 上找到了一个使用 php 上传图片的好函数,但我不知道它的参数之一。
upload_image($_FILES,'file',250,'city',500,'../../uploaded/',1048576);
- 这个函数中的'file'是什么?
- 这是我网站上使用的可信功能吗?
考虑 the lines:
$file[$fileIndex]['tmp_name']
$file[$fileIndex]['error']
$file[$fileIndex]['name']
$file[$fileIndex]['type']
$file[$fileIndex]['size']
$file
是a three-dimensional array,由name
、tmp_name
、type
、size
、error
的数组组成.
这是您在 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
.
我在 github 上找到了一个使用 php 上传图片的好函数,但我不知道它的参数之一。
upload_image($_FILES,'file',250,'city',500,'../../uploaded/',1048576);
- 这个函数中的'file'是什么?
- 这是我网站上使用的可信功能吗?
考虑 the lines:
$file[$fileIndex]['tmp_name']
$file[$fileIndex]['error']
$file[$fileIndex]['name']
$file[$fileIndex]['type']
$file[$fileIndex]['size']
$file
是a three-dimensional array,由name
、tmp_name
、type
、size
、error
的数组组成.
这是您在 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 bydestination
.