CURLStringFile 类
(PHP 8 >= 8.1.0)
简介
CURLStringFile 能够直接把一个变量作为文件上传。
这与 CURLFile 用法比较相似,但是它使用的是文件的内容,而不是文件名。
这个类或者 CURLFile 都需要和 CURLOPT_POSTFIELDS
参数一同使用以上传文件。
类摘要
class CURLStringFile
{
/* 属性 */
/* 方法 */
}属性
- data
-
待上传的内容
- postname
-
上传数据中的文件名称
- mime
-
文件的 MIME 类型(默认为
application/octet-stream
)。
目录
- CURLStringFile::__construct — 创建 CURLStringFile 对象

User Contributed Notes
There are no user contributed notes for this page.