最近用curl上传文件,发现报错 The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead 原来是PHP5.5废弃了@这种模式,只需要把原来的: <?php $data = array( 'file' => '@/PATH/TO/FILE', //..