CURLFile::__constructcurl_file_createCreate a CURLFile object DescriptionObject oriented style
public CURLFile::__construct
( string
$filename
[, string $mimetype
[, string $postname
]] )Procedural style
CURLFile curl_file_create
( string
$filename
[, string $mimetype
[, string $postname
]] )
Creates a CURLFile object, used to upload a file with Parameters
Return ValuesReturns a CURLFile object. ExamplesExample #1 CURLFile::__construct example Object oriented style
<?phpProcedural style
<?phpThe above example will output:
array(1) {
["test_file"]=>
array(5) {
["name"]=>
string(9) "test_name"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpPC9Kbx"
["error"]=>
int(0)
["size"]=>
int(46334)
}
}
See Also
|