JSON loads on localhost but not on production [closed]

1

I'm developing a site project that uses JSON files to feed the dynamic data. On localhost, using XAMPP, the data is loaded but when I upload to a production server the page does not read the JSON files, it returns NULL where the data should appear. All project, html files, js, css, json, images, etc, are in the same domain. Is there any way to setup on the server that might be causing this? I know there is a limitation if the JSON file is in a different domain (cross domain). That is not the case.

HTML looks like this:

<div id="slider">
    <div class="slides" id="carregaSlides">
    </div>
</div>

In JS it looks like this:

function carregaSlides() {
    loadSlide ="";
    //$("#carregaSlides").html("");
    $.getJSON('json/slides.json', function(data){

        $.each(data, function(key, val){
            loadSlide += "<div class='slider'><div class='legend'></div><div class='content'><div class='content-txt'></div></div><div class='image'><img src='slides/"+ val.slide +"' class='imgSlide'></div></div>";
            $("#carregaSlides").html(loadSlide);
        });

});

}
    
asked by anonymous 06.07.2017 / 17:33

0 answers