我编辑了这段代码很多次(im noob whit php),我的问题是使用此代码上传多个文件.我只能上传1个文件.
这是代码:
<?php
/**
* uploadFile()
*
* @param string $file_field name of file upload field in html form
* @param bool $check_image check if uploaded file is a valid image
* @param bool $random_name generate random filename for uploaded file
* @return array
*/
function uploadFile ($file_field = null, $check_image = false, $random_name = false) {
//Config Section
//Set file upload path
$path = 'c:/xampp/htdocs/'; //with trailing slash
//Set max file size in bytes …Run Code Online (Sandbox Code Playgroud)