為什么在前端輸入localhost:8080/提示not found 是路徑不對(duì)么
import web
render = web.template.render('tompalates') #相對(duì)路徑或絕對(duì)路徑 ?相對(duì)與.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ù)器有沒(méi)有打開,再看下8080這個(gè)端口是否被占用了,修改端口試下。