【发布时间】:2012-07-20 22:43:09
【问题描述】:
我需要使用 curl 命令行实用程序将多个文件上传到服务器。对于单个文件,我使用没有问题:
curl -F "image=@file1.gif" http://localhost:8888/web/Upload.php
如何处理多个文件,以便 php 变量 $_FILES["image"]["error"] 返回一个数组?
我试过了
curl -F "image=@file1.gif" -F "image=@file2.gif" http://localhost:8888/web/Upload.php
curl -F "image=@file1.gif,image=@file2.gif" http://localhost:8888/web/Upload.php
但这些只是在黑暗中刺伤。
【问题讨论】: