Please wait while we load your page...

Tools

PHP Manual [The CURLFile class]

Protect Your Website Today


PHP Manual || cURL

(PHP 5 >= 5.5.0, PHP 7)

CURLFile should be used to upload a file with CURLOPT_POSTFIELDS.

CURLFile {
/* Properties */
public mixed name ;
public mixed mime ;
public mixed postname ;
/* Methods */
public __construct ( string $filename [, string $mimetype = "" [, string $postname = "" ]] )
public getFilename ( void ) : string
public getMimeType ( void ) : string
public getPostFilename ( void ) : string
public setMimeType ( string $mime ) : void
public setPostFilename ( string $postname ) : void
public __wakeup ( void ) : void
}
name

Name of the file to be uploaded.

mime

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

postname

The name of the file in the upload data (defaults to the name property).



PHP Manual || cURL