我目前正在测试mod_wsgi,并尝试在浏览器中打印我的uid。
import os
uid = os.getuid()
print("uid being used:", uid)
def application(environ, start_response):
status = '200 OK'
output = b'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
预期的结果是,我会得到我的uid打印在屏幕上。所以我知道什么用户Mod_wsgi脚本正在运行..但我目前只将Hello World打印到屏幕
1条答案
按热度按时间xeufq47z1#
在discord上找到了答案,因为其他人可能会发现它有帮助