zend_file_transfer_adapter_http 可以接收额外的参数(文本)吗?

can zend_file_transfer_adapter_http receive additional parameters(text)?

我有一种情况,我必须上传文件并将 ID(text/number 类型)发送到服务器。如果我使用 zend_file_transfer_adapter_http,我可以在服务器端获取 ID 和文件吗?

Zend_File_Transfer_Adapter_http 仅用于上传文件。如果您还需要传递其他数据,您仍然可以,但使用隐藏的输入字段。

$request = $this->getRequest();
if ($request->isPost()){
    $id = $request->getPost('id');

    // Do whatever you need to do with the file and id
}