Jquery ajax call return php file content

I have a jQuery ajax function that asks for a php file (carousel.php) and does some things with the result. This all works fine on our development server, but on our real server the script seems to fail and returns the contents of the PHP file (source code). So PHP doesn't even get executed. What could be here?

        $.ajax({
        url: 'carousel.php',
        dataType: 'json',
        cache: false,
        success: function(result){
            if(result.success){
                if (result.numRows == 0) {
                    $('#insert').css('display','none');
                }
                $('#selectBox').html(result.html);
            } 
        }
    })

      

+3
jquery ajax php


source to share


1 answer


You are probably using a tag <?

in your php file and the short open tag is not enabled on your server.



+3


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics