Rephp程序上传多媒体文件接口代码
你好,一直提示【
string(47) "{"errcode":40035,"errmsg":"不合法的参数"}"】,请问这是什么问题,我的代码如下:
require_once(__ROOT__."/Dkaifa/env.php");
$access_token=$this->access_token(CORPID,SECRET);
$url = "https://oapi.dingtalk.com/media/upload?access_token=".$access_token."&type=image";
$file['media'] = "@/wuye.sxxiangda.com/ma.jpg"; //这里的“/www/test.jpg”文件的绝对路径
$res = $this->http_post($url,$file);
if($res['errcode'] == 0){
dump($res);
//文件上传成功 $res['media_id'] 就是返回的 素材id
}else{
echo "上传失败";
}