Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript XML读取代码在我的服务器上工作,但在我的客户机服务器上不工作_Javascript_Jquery_Html_Css_Xml - Fatal编程技术网

Javascript XML读取代码在我的服务器上工作,但在我的客户机服务器上不工作

Javascript XML读取代码在我的服务器上工作,但在我的客户机服务器上不工作,javascript,jquery,html,css,xml,Javascript,Jquery,Html,Css,Xml,我已经写了图像滑块代码。它读取XML文件中的所有图像细节。我已经在服务器上测试过,它工作正常,但当客户端将其放在服务器上时,似乎没有加载链接XML读取。你能帮我找出这件事的原因吗 下面是客户端安装代码的链接 $.get('photos.xml',函数(xml){ $('item',xml).each(函数(k){ frontimg.push($(this.find('frontimg').text()); stripimg.push($(this.find('stripimg').text()

我已经写了图像滑块代码。它读取XML文件中的所有图像细节。我已经在服务器上测试过,它工作正常,但当客户端将其放在服务器上时,似乎没有加载链接XML读取。你能帮我找出这件事的原因吗

下面是客户端安装代码的链接

$.get('photos.xml',函数(xml){
$('item',xml).each(函数(k){
frontimg.push($(this.find('frontimg').text());
stripimg.push($(this.find('stripimg').text());
push($(this.find('frontTxt').text());
fTitle.push($(this.find('title').text());
fCity.push($(this.find('city').text());
fYear.push($(this.find('compYear').text());
fLoc.push($(this.find('loc').text());
fType.push($(this.find('type').text());
fRole.push($(this.find('role').text());
arrBackImg.push($(this.find('backImg').text());
backText.push($(this.find('backTxt').text());
frontDiv.push(“+fTitle[k]+”+“+fCity[k]+”
竣工年份“+fYear[k]+”
位置“+fLoc[k]+”
物业类型“+fType[k]+”
枫树类型“+fRole[k]); $('#myImageFlow')。追加(''+frontDiv[k]+''); }); ......................................... });
注意:
在控制台中,我没有收到任何错误和问题。

在服务器上,您确定有权读取该XML文件吗


这可能就是问题所在。

@n图书已关闭,我只粘贴了一半代码。。。相同的代码在我的服务器上工作,但在客户机服务器上不工作
$.get('photos.xml', function (xml) {
    $('item', xml).each(function (k) {
        frontimg.push($(this).find('frontImg').text());
        stripimg.push($(this).find('stripImg').text());
        frontText.push($(this).find('frontTxt').text());
        fTitle.push($(this).find('title').text());
        fCity.push($(this).find('city').text());
        fYear.push($(this).find('compYear').text());
        fLoc.push($(this).find('loc').text());
        fType.push($(this).find('type').text());
        fRole.push($(this).find('role').text());
        arrBackImg.push($(this).find('backImg').text());
        backText.push($(this).find('backTxt').text());

        frontDiv.push("<h2>" + fTitle[k] + "</h2>" + "<h3>" + fCity[k] + "</h3><hr><h4>YEAR OF COMPLETION</h4>" + fYear[k] + "<hr><h4>LOCATION</h4>" + fLoc[k] + "<hr><h4>PROPERTY TYPE</h4>" + fType[k] + "<hr><h4>MAPLETREE'S TYPE</h4>" + fRole[k]);


        $('#myImageFlow').append('<div id="id' + k + '" alt="div' + k + '" class="sliderImage" width="280" height="425" style="visibility:hidden"> <div class="frontText" id="f' + k + '">' + frontDiv[k] + '</div><div class="borderdiv" id="b' + k + '"></div><div class="borderdiv1" id="bd' + k + '"></div><div class="reflection" id="ref' + k + '"></div>  <div class="overlay" id="o' + k + '"></div></div>');


    });
.........................................


});