(1)在route.php下写两个路由,如下图:
Route::any('/file_update','FileUpdateController@fileUpdate'); Route::any('/file_get','FileUpdateController@fileGet');
(2)在控制器FileUpdateController内建立fileUpdate和fileGet两个函数,前者View跳转,后者处理上传文件,看代码:
A页面:
@extends('page') @section('content') <div class="container"> <div class="upload_form_cont"> <form id="upload_form" enctype="multipart/form-data" method="post" action="{ { asset('').'/file_get'}}" οnsubmit="return startUploading();">