為什么在前端輸入localhost:8080/提示not found 是路徑不對么
import web
render = web.template.render('tompalates') #相對路徑或絕對路徑 ?相對與.py文件
urls = (
'/index', 'index',
'/blog/\d+', 'blog',
'/(.*),', 'hello'
)
app = web.application(urls, globals())
class index:
def GET(self):
query = web.input()
return query
class blog:
def POST(self):
data = web.input()
return data
def GET(self):
return web.ctx.env
class hello:
def GET(self, name):
return render.hello1()
2017-04-23
看下服務(wù)器有沒有打開,再看下8080這個端口是否被占用了,修改端口試下。