Вопрос по javascript, php, ajax, response – ajax: responsetext возвращает весь мой php-код локально

2

Error: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>AJAX Tutorial</title>
</head>
<body>
    <div id="time"></div>
    <button onclick="getTime();">Aktualisieren</button>
    <script type="text/javascript" src="script.js"></script>
</body>
</html> 

Error: User Rate Limit Exceeded

var req = getXmlHttpRequestObject();
window.onload = getTime();

function getXmlHttpRequestObject()
{
    if(window.XMLHttpRequest) 
    {
         return new XMLHttpRequest();
    } 
    else if(window.ActiveXObject) 
    {
        return new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else 
    {
        alert('Ajax funktioniert bei Ihnen nicht!');
    }
}

function getTime()
{
    if(req.readyState == 4 || req.readyState == 0) 
    {
        req.open('GET', 'ajaxclock.php', true);
        req.setRequestHeader("Content-Type","text/plain");
        req.onreadystatechange = setMessage;
        req.send(null);
    }
}

function setMessage()
{
    if(req.readyState == 4) 
    {
        var response = eval('(' + req.responseText+ ')');
        document.getElementById('time').innerHTML = response.time;
    }
}

Error: User Rate Limit Exceeded

<?php echo '{"time": "'.date("H:i:s").'"}'; ?>
Error: User Rate Limit Exceeded samouray
Error: User Rate Limit Exceeded Joseph
Error: User Rate Limit ExceededreqError: User Rate Limit Exceeded Quentin
Error: User Rate Limit Exceededtext/plainError: User Rate Limit Exceeded Quentin

Ваш Ответ

1   ответ
6

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded user1337922
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededhttp://localhost/…
Error: User Rate Limit Exceeded user1337922

Похожие вопросы