2 fang062407 fang062407 于 2013.11.08 10:29 提问

FTP模拟HTTP Basic Authorization

类似于HTTP协议
$.ajax
({
type: "GET",
url: "index1.php",
dataType: 'json',
async: false,
data: '{}',
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', "Basic " + btoa(username+":"+password));
},
success: function (){
alert('Thanks for your comment!');
}
});

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!