国产精品成人VA在线观看,亚洲日韩在线中文字幕综合,亚洲AV电影天堂男人的天堂,久久人人爽人人爽人人av东京热

News新聞

業(yè)界新聞動(dòng)態(tài)、技術(shù)前沿
Who are we?

您的位置:首頁(yè)      樂(lè)道系統(tǒng)FAQ      php 多文件上傳的實(shí)現(xiàn)實(shí)例

php 多文件上傳的實(shí)現(xiàn)實(shí)例

標(biāo)簽: 發(fā)布日期:2016-10-23 00:00:00 261

首先向大家講解一下實(shí)現(xiàn)的方法。

要實(shí)現(xiàn)多文件上傳,我們可以在form表單中添加多個(gè)input file域,然后將這些input file的name屬性設(shè)置為相同的名稱且使用數(shù)組的形式命名,例如filename[]。至于文件上傳的php代碼和單個(gè)文件上傳是一樣的道理。

下面看一個(gè)多文件上傳的實(shí)例:

html文件example.html

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<form action="my_parser.php" method="post" enctype="multipart/form-data">
 <p><input type="file" name="file_array[]"></p>
 <p><input type="file" name="file_array[]"></p>
 <p><input type="file" name="file_array[]"></p>
 <input type="submit" value="Upload all files">
</form>
</body>
</html>