JAVA侧代码
//wangzhi 为网址
//file 为文件路径
public static String shangchuan(wangzhi 为 String,file 为 String)
{
EasyHttp.upload(wangzhi, file, new EasyHttp.OnRequestListener(){
public void onCompleted(String code, String text, byte[] content, String cookie) {
return text;
}
public void onFailed(String code, String text, byte[] content) {
return code;
}
public void onProgressChanged(int progress) {
return progress;
}
});
}
PHP要如何获取这个方法上传的文件?
如果部在同个服务器,可以通过硬盘上的路径访问,如果不是,正常上传后应该要返回一个访问链接,通过访问链接获取