如何使用 ->setFileUpload() 上传多个文件?
例如我有这个:
<form method="post"
action="/file/csvupload"
target="myadmin_b20301"
enctype="multipart/form-data">
<input type="text" name="test" id="test" value="">
<input type="file" name="file[]" id="attachment" class="attachment">
<input type="file" name="file[]" id="attachment" class="attachment">
<input type="file" name="file[]" id="attachment" class="attachment">
<input type="submit" name="submit" id="submit" value="Update">
</form>
PHP:(主要上传后,它推送到管理面板,这是另一篇文章)。
....
if (!$upload->isValid()) // /file/csvupload
{
....
$client = new Zend_Http_Client(); // upload now to administrator another copy
$client->setUri($uri);
$client->setParameterPost(array('test'=>'test');
//how do i tell here to use those same file[] which are multiple?
$client->setFileUpload('/tmp/Backup.tar.gz', 'bufile');
$client->request( );