PHP Conference Nagoya 2025

The CURLStringFile class

(PHP 8 >= 8.1.0)

Giriş

CURLStringFile makes it possible to upload a file directly from a variable. This is similar to CURLFile, but works with the contents of the file, not filename. This class or CURLFile should be used to upload the contents of the file with CURLOPT_POSTFIELDS.

Sınıf Sözdizimi

class CURLStringFile {
/* Özellikler */
public string $data;
public string $mime;
/* Yöntemler */
public __construct(string $data, string $postname, string $mime = "application/octet-stream")
}

Özellikler

data

The contents to be uploaded.

postname

The name of the file to be used in the upload data.

mime

MIME type of the file (default is application/octet-stream).

Ayrıca Bakınız

İçindekiler

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top