0
如何使用php在Intel-xdk中顯示來自MySQL的圖像。請如何使用ajax請求在英特爾xdk中顯示圖像? 我試圖檢索只顯示文本而不是圖像的信息。 我使用PHP,當我請求的信息只有文本正在顯示。 這裏是我用來檢索數據如何使用php在Intel-xdk中使用php顯示MySQL中的圖像
function showUser() {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("list").innerHTML = this.responsetext;
}
};
xmlhttp.open("GET", "http://localhost/SaltCity/index.php",true);
xmlhttp.send()
}
請分享一些代碼... – hering
請我添加的代碼我用來檢索信息 – tyma
您是否下載混合內容?如果您要將圖片作爲文本下載,則必須使用base64編碼您的響應,然後以此方式顯示。如果您正在下載html,那麼您只需將其呈現爲html並檢查所有鏈接是否已正確引用。 –