我想通過嘗試通過PHP插入選定的文件到MySQL數據庫來實現blueimp jQuery文件上傳。使用blueimp jQuery文件上傳
我與Basic Plus UI
一個工作,你可以找到here
下面的形式:
<form id="fileupload" action="" method="POST" enctype="multipart/form-data">
<!-- Redirect browsers with JavaScript disabled to the origin page -->
<noscript><input type="hidden" name="redirect" value="http://blueimp.github.io/jQuery-File-Upload/"></noscript>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-lg-7">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
<i class="glyphicon glyphicon-plus"></i>
<span>Add files...</span>
<input type="file" name="files[]" multiple>
</span>
<button type="submit" class="btn btn-primary start">
<i class="glyphicon glyphicon-upload"></i>
<span>Start upload</span>
</button>
<button type="reset" class="btn btn-warning cancel">
<i class="glyphicon glyphicon-ban-circle"></i>
<span>Cancel upload</span>
</button>
<button type="button" class="btn btn-danger delete">
<i class="glyphicon glyphicon-trash"></i>
<span>Delete</span>
</button>
<input type="checkbox" class="toggle">
<!-- The global file processing state -->
<span class="fileupload-process"></span>
</div>
<!-- The global progress state -->
<div class="col-lg-5 fileupload-progress fade">
<!-- The global progress bar -->
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
</div>
<!-- The extended global progress state -->
<div class="progress-extended"> </div>
</div>
</div>
<!-- The table listing the files available for upload/download -->
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
</form>
我想要的形式發送到一個名爲process.php
頁能夠處理所有的數據和上傳將這些文件保存到數據庫表中。
我很困惑所有的jQuery的東西,因爲它似乎發送到表單。
你能幫助我理解如何通過處理它的PHP頁面將選定的文件發送到分貝。
我可以處理我只需要知道如何將表單發送到一個PHP頁面,通過$_FILES[files]
獲取所有選擇的文件的所有處理。
我已經嘗試設置action="process.php"
,但是當我點擊提交按鈕時,這並沒有做任何事情。
哦,你能評論你爲什麼downvoted而不是僅僅做它嗎? – user3574492