©
This document uses PHP Chinese website manual Release
(PHP 5 >= 5.5.0, PHP 7)
curl_file_create — 创建一个 CURLFile 对象
此函数是该函数的别名: CURLFile::__construct()
[#1] mipa [2014-03-04 20:32:31]
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" : '');
}
}
?>