callmez\wechat\sdk\components\BaseWechat::uploadFile PHP Method

uploadFile() protected method

上传文件请使用该类来解决curl版本兼容问题
protected uploadFile ( $filePath ) : CURLFile | string
$filePath
return CURLFile | string
    protected function uploadFile($filePath)
    {
        // php 5.5将抛弃@写法,引用CURLFile类来实现 @see http://segmentfault.com/a/1190000000725185
        return class_exists('\\CURLFile') ? new \CURLFile($filePath) : '@' . $filePath;
    }