Since: 8.1

class CURLStringFile (View source)

Properties

string $data
string $mime
string $postname

Methods

__construct(string $data, string $postname, string $mime = 'application/octet-stream')

Create a CURLStringFile object

Details

__construct(string $data, string $postname, string $mime = 'application/octet-stream')

Create a CURLStringFile object

Creates a CURLStringFile object, used to upload a file with CURLOPT_POSTFIELDS.

Parameters

string $data

The contents to be uploaded.

string $postname

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

string $mime

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