How to serve file in webpy?
问题 I am using webpy framefork. I want to serve static file on one of requests. Is there special method in webpy framework or I just have to read and return that file? 回答1: If you are running the dev server (without apache): Create a directory (also known as a folder) called static in the location of the script that runs the web.py server. Then place the static files you wish to serve in the static folder. For example, the URL http://localhost/static/logo.png will send the image ./static/logo.png