我有
<script type="text/javascript">
function setupComet()
{
dojox.cometd.init("http://comet.domain.tld:8000");
dojox.cometd.subscribe("/my/calendar", cometCallback);
}
dojo.addOnLoad(setupComet);
function cometCallback (msg)
{
alert(msg.data);
}
</script>
Orbited 正在回复(用萤火虫查看):
<html>
<head><title>404 - No Such Resource</title></head>
<body>
<h1>No Such Resource</h1>
<p>No such child resource.</p>
</body>
</html>
我做错了什么?
我想要达到的目标:
浏览器进入页面并订阅(只读)频道。当浏览器发送 POST 数据时,PHP 端会将数据发送到数据库,然后将“刷新”发布到该彗星通道。浏览器得到这个并刷新页面。
/etc/orbited.cfg:
[global]
reactor=epoll
session.ping_interval = 40
session.ping_timeout = 30
user=orbited
[listen]
http://:8000
[static]
[access]
* -> localhost:8000
* -> dev.lan:80
[logging]
debug=STDERR,debug.log
info=STDERR,info.log
access=STDERR,info.log
warn=STDERR,error.log
error=STDERR,error.log
enabled.default=info,access,warn,error,debug