php response is php content

php response is php content

oolcayoolcay Posts: 1Questions: 1Answers: 0

i use to datatable but ajax php response is php content file

when i run the php file output is true. but run my web application i get error that invalid json response

my datatable code is below.


  • colincolin Posts: 15,022Questions: 1Answers: 2,570

    That's a problem with your website, you haven't installed the PHP components correctly - I've done the same in the past. This SO thread should get you going - it's listing the steps you need to do.


  • kthorngrenkthorngren Posts: 19,462Questions: 26Answers: 4,610
    edited October 2022

    Possibly you just need to add header('Content-type: application/json'); as discussed in this SO thread.


  • allanallan Posts: 60,302Questions: 1Answers: 9,791 Site admin

    I'd guess that PHP either isn't installed or that the HTTP server isn't setup to use PHP for .php files.

    What web-server are you using @oolcay?


Sign In or Register to comment.