Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 python 瓶框架的新手,需要专门获取 $_SERVER['HTTP_USER_AGENT'] 变量值。有人可以解释一下我该如何实现这一点。
尝试一下:
import request, route, run @route('/user-agent') def user_agent(): return request.environ.get('HTTP_USER_AGENT') run()