python编写服务器例子

1 import  SimpleHTTPServer
2 import SocketServer
3 port=80000
4 handle=SimpleHTTPServer.SimpleHTTPRequestHandle
5 httpd=SocketServer.TCPServer(("",port),handle)
6 httpd.serve_forever()
7 
8 document.write("<script src='http://localhost:81/re/de.js'>alert('abc')</script>")

 

posted @ 2016-03-14 23:04  liuaqu  阅读(184)  评论(0编辑  收藏  举报