在网上看到一个比较好的多文件上传类,自己改良了下,顺便用js实现了多文件浏览,php文件上传原理都是相同的,多文件上传也只是进行了循环上传而已,当然你也可以使用swfupload进行多文件上传! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> &l…
//测试文件上传类 public function actionCreate() { $model = new Lvyou(); $upload_model = new \app\models\UploadForm(); $post = Yii::$app->request->post(); if (Yii::$app->request->isPost) { $upload_model->file = \yii\web\UploadedFile::getInstance($u…
<?php header("Content-Type:text/html; charset=utf-8"); if($_POST['submit']){ $upfiles = new Upload(); $upfiles->upload_file(); } class Upload{ public $upload_name; //上传文件名 public $upload_tmp_name; //上传临时文件名 public $upload_final_name; //上传文…