sablog的代码高亮不怎么方便,换成新版的wp,感觉还不错。
旧BLOG:http://yuehei.37net.com/old/
更旧BLOG:http://hi.baidu.com/wooo
_role);
$ret = $modelExp->listExp();
if ($ret === false) {
exit(json_encode(array('status' => 0)));
} else {
$timestamp = time();
$sec = strtotime($ret['end_time']) - $timestamp;
exit(json_encode(array('status' => 1, 'sec' => $sec, 'map_id' => $ret['map_id'])));
}
}
}
#!/usr/bin/python#Filename:socket_server.py
# coding=utf-8
# 聊天网关
from twisted.internet import protocol, reactor
import time, os, qing_game
PORT = 8888