AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## 上传文件 The file uploads in`$_FILES`are available from the Request object’s`getUploadedFiles()`method. This returns an array keyed by the name of the`input`element. > `$_FILES`中的文件上传可以从请求对象的`getUploadedFiles()`方法获得。这将返回一个以`input`元素的名称作为键值的数组。 ~~~php $files = $request->getUploadedFiles(); ~~~ Figure 11: Get uploaded files Each object in the`$files`array is a instance of`Psr\Http\Message\UploadedFileInterface`and supports the following methods: > $files数组中的每个对象都是`Psr\Http\Message\UploadedFileInterface`的实例,并且支持以下方法: * getStream() * moveTo($targetPath) * getSize() * getError() * getClientFilename() * getClientMediaType() See the[# 使用POST表单上传文件]([https://ihavenolimitations.xyz/dehuadong/slim4/1332006](https://ihavenolimitations.xyz/dehuadong/slim4/1332006))on how to upload files using a POST form.