【发布时间】:2013-11-17 09:06:35
【问题描述】:
当我单击运行按钮时,在 chrome 控制台中显示此错误并且不提醒任何内容
POST http://mysite/gd/add.php 503 (Service Unavailable)
index.php
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body >
<script>
function go(){
$.ajax({ url: 'add.php',
data: {'q': ''},
type: 'post',
success: function(output) {
alert(output);}
});
}
</script>
<button onclick="go();">Run</button>
</body>
</html>
添加.php
<?php echo "Hello"; ?>
【问题讨论】:
-
您在 cgi 中使用 php 并且 php 无法正常工作/崩溃
-
如果您在浏览器中输入mysite/gd/add.php 是否有效?
-
如何通过ajax从php页面获取数据?
-
一次警报和一次显示错误
标签: javascript php jquery ajax http-status-code-503