Heim  >  Artikel  >  Backend-Entwicklung  >  PHP多文件上传分析_PHP教程

PHP多文件上传分析_PHP教程

WBOY
WBOYOriginal
2016-07-20 11:05:57772Durchsuche

PHP多文件上传个人理解总结

多文件上传是PHP中一基础应用,在此把相关知识向大家详细介绍一下,本人水平有限,还请多提意见。大家一起进步。
        上传文件HTML的输入标签FILE类型中的名称后要加[],作用是在HTML中向PHP建立数组,比如名称为pictures,多文件引用名称则为pictures[],实例如下:
 
<br><font face="仿宋_GB2312"><form action="upload.php" method="post" enctype="multipart/form-data"> <br><p><br><input type="file" name="pictures[]"><br><br><input type="file" name="pictures[]"><br><br><input type="file" name="pictures[]"><br><br><input type="submit" value="上传"><br></p> <br> </form> //手册中实例。</font>利用HTML文件建立数组的方法手册中是这样讲解的:

        要使你的
结果被当成 array 发送到 PHP 脚本,要对
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn