如何实现面向对象的多文件上传
require_once 'upload.class.php'; $upload = new upload(); $dest = $upload->uploadFile('myFile');
<?php header('Content-Type:text/html;Charset=utf-8'); require_once 'upload.class.php'; $uploadFiles = new upload(); //多文件,处理成单文件结构 $files = $uploadFiles->getFiles($_FILES); $uploadFiles->debug($files, '$files'); echo '---------------------------------------------'; //循环上传 foreach ($files as $file) { $uploadFiles = new upload(); $res = $uploadFiles->uploadFile(); $uploadFiles[] = $res; }