![]() |
#2
静夜思2011-07-06 18:15
|
代码如下:code.py
![](zzz/editor/img/code.gif)
import web
urls = (
'/index', 'index'
# '/hello', 'hello'
)
class index:
def GET(self):
return "111hello world"
#return render.base(view.listing())
#class hello:
# def GET(self):
# return "Hello, webpy!"
application = web.application(urls, globals()).wsgifunc()
apache配置如下:urls = (
'/index', 'index'
# '/hello', 'hello'
)
class index:
def GET(self):
return "111hello world"
#return render.base(view.listing())
#class hello:
# def GET(self):
# return "Hello, webpy!"
application = web.application(urls, globals()).wsgifunc()
![](zzz/editor/img/code.gif)
WSGIScriptAlias /webpy "/var/www/webpy/code.py/"
Alias /webpy/static "/var/www/webpy/static/"
<Directory "/var/www/webpy">
Order allow,deny
Allow from all
</Directory>
Alias /webpy/static "/var/www/webpy/static/"
<Directory "/var/www/webpy">
Order allow,deny
Allow from all
</Directory>
求解~~~