我有一个 php 文件,path/renderer/renderImage.php
用于构建并向浏览器返回 PNG 图像。当我使用浏览器导航到该 URL 时,它会在屏幕上转储正确的图像。但是,当我尝试使用以下来自 path/index.html 的代码使用 jQuery 将该图像加载到 DIV 中时...
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
....
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$.colorbox({
width:"30%",
inline:true,
href:"#inline_content",
onClosed: function() {
$("#myPic").load('./renderer/renderPicture.php');
$('#myPic').css('display','inline');
}
});
它用奇怪的符号填充 DIV ......
这是目录结构的图片:
为什么浏览器在这两个页面上对图片的解释不同?什么可能导致差异?