简体   繁体   中英

Ajax jquery and php problem

I have a french website and it works flawlessly on my localhost it is made with php and javascript and html and mysql.

http://techtionary.comeze.com/game.php

This is the link

the signup works(ps if you enter any user name and password it will let you in)

Then look at the page game.php

if you look at the source code you will all my ajax requests.

This website was hacked together in one night as an overdue project so do not judge the coding style.

Just please could someone tell me why my ajax post requests are not working.

Looking at it in firebug, your game.php file sends a request to maketable.php - but it looks for it on the localhost, rather than its location on the server.

Look at the request in firebug:

GET http://localhost:8888/school/maketable.php

localhost in your code

    setInterval(function(){ 
        $("#about").prepend("<div id='message'></div>");
        $("#message").load("http://localhost:8888/school/maketable.php");
    }, 3000);
    setInterval(function(){ 
        $("#points").load("score.php");

$("#message").load("http:// localhost:8888 /school/maketable.php");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM