PHP 5.6.0beta1 released

curl_file_create

(PHP 5 >= 5.5.0)

curl_file_createCreate a CURLFile object

Description

This function is an alias of: CURLFile::__construct()

add a note add a note

User Contributed Notes 1 note

up
-1
mipa
1 month ago
For PHP < 5.5:

<?php

if (!function_exists('curl_file_create')) {
    function
curl_file_create($filename, $mimetype = '', $postname = '') {
        return
"@$filename;filename="
           
. ($postname ?: basename($filename))
            . (
$mimetype ? ";type=$mimetype" : '');
    }
}

?>
To Top