The CURLFile class
This class or CURLStringFile should be used to upload a file with CURLOPT_POSTFIELDS.
Intro
This class or CURLStringFile 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.
Class synopsis
Properties
nameName of the file to be uploaded.
mimeMIME type of the file (default is
application/octet-stream).postnameThe name of the file in the upload data (defaults to the
nameproperty).
See Also
curl_setopt()CURLStringFile
Curlfile