cURL CURLFile 클래스

(PHP 5 >= 5.5.0, PHP 7, PHP 8)


소개

이 클래스 또는 CURLStringFileCURLOPT_POSTFIELDS가 있는 파일을 업로드하는 데 사용해야 합니다.

CURLFile 인스턴스의 직렬화 해제는 허용되지 않습니다. PHP 7.4.0부터 직렬화는 애초에 금지되어 있습니다.


클래스 개요

                  
class CURLFile {

  /* Properties */
  public string $name = "";
  public string $mime = "";
  public string $postname = "";

  /* Methods */
  public __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null)
  public getFilename(): string
  public getMimeType(): string
  public getPostFilename(): string
  public setMimeType(string $mime_type): void
  public setPostFilename(string $posted_filename): void
}
                  
                

Properties

name
업로드할 파일의 이름입니다.
mime
파일의 MIME 유형입니다(기본값은 application/octet-stream).
postname
업로드 데이터의 파일 이름입니다(기본값은 name 속성).

기타


목차