samedi 1 août 2015

Auto Load and Refresh Div 500 internal server error

I am trying to make a refresh div every x second. But i have one problem.

I am trying to refresh div with the following code:

<script type="text/javascript">
var auto_refresh = setInterval(
   function () {
     $('#test').load('updates.php').fadeIn("slow");
   }, 10000); // refresh every 10000 milliseconds
</script>

html and php incldue:

<div class="container" id="test">
  <?php include("updates.php");?>
</div>

The problem is Chrome Developer Console said:

GET http://localhost:8888/updates.php 500 (Internal Server Error)

Note: My php file is in root folder and also i still try / from the ajax URL.

What is the problem here? What i need to do to fix that error? anyone can help me in this regard ?

Aucun commentaire:

Enregistrer un commentaire