PHP 5.4.31 Released

curl_file_create

(PHP 5 >= 5.5.0)

curl_file_createCreate a CURLFile object

Descrição

Esta função é um apelido para: CURLFile::__construct()

add a note add a note

User Contributed Notes 1 note

up
2
mipa
4 months 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