cURL CURLStringFile 클래스

(PHP 8 >= 8.1.0)


소개

CURLStringFile을 사용하면 변수에서 직접 파일을 업로드할 수 있습니다. 이것은 CURLFile과 유사하지만 파일 이름이 아닌 파일의 내용과 함께 작동합니다. 이 클래스 또는 CURLFileCURLOPT_POSTFIELDS로 파일의 내용을 업로드하는 데 사용해야 합니다.


클래스 개요

                  
class CURLStringFile {

  /* Properties */
  public string $data;
  public string $postname;
  public string $mime;

  /* Methods */
  public __construct(string $data, string $postname, string $mime = "application/octet-stream")
}
                  
                

Properties

data
업로드할 내용입니다.
postname
업로드 데이터에 사용할 파일의 이름입니다.
mime
파일의 MIME 유형입니다(기본값은 application/octet-stream).

기타


목차