php betiğini include edemezsin ancak betiğin çıktısını alabilirsin. Bunun için de XMLHttpRequest kullanmalısın.

Şunun gibi bişey olur heralde
<html>
<head>

</head>
<body>
<div id="stats">a</div>

<script>

function processStateChange(){
  statusDiv = document.getElementById("stats");
  if (req.readyState == 0){ statusDiv.innerHTML = "UNINITIALIZED"; }
  if (req.readyState == 1){ statusDiv.innerHTML = "LOADING"; }
  if (req.readyState == 2){ statusDiv.innerHTML = "LOADED"; }
  if (req.readyState == 3){ statusDiv.innerHTML = "INTERACTIVE"; }
  if (req.readyState == 4){
    statusDiv.innerHTML = "COMPLETE"; 
    statusDiv.innerHTML = req.responseText; 
    }
}

req = new ActiveXObject("Msxml2.XMLHTTP");
if (req) {
    req.onreadystatechange = processStateChange;
    req.open("GET", "http://localhost/deneme.php", true);
    req.send();
}

</script>
</body>
</html>