(PHP 5 >= 5.5.0, PHP 7)
CURLFile should be used to upload a file with CURLOPT_POSTFIELDS
.
Unserialization of CURLFile instances is not allowed. As of PHP 7.4.0, serialization is forbidden in the first place.
$filename
[, string|null $mime_type
= null
[, string|null $posted_filename
= null
]] )public getFilename ( ) : string
public getMimeType ( ) : string
public getPostFilename ( ) : string
public setMimeType ( string $mime_type ) : void
public setPostFilename ( string $posted_filename ) : void}
Name of the file to be uploaded.
MIME type of the file (default is application/octet-stream
).
The name of the file in the upload data (defaults to the name property).
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.curlfile.php