您好我正在尝试使用 python 创建一个 Web 服务器,但我收到一条错误消息 PermissionError: [Errno 13] Permission denied
这是我的代码:
import os, sys
from http.server import HTTPServer, CGIHTTPRequestHandler
webdir = '.'
port = 80
os.chdir(webdir)
srvaddr = ('', port)
srvobj = HTTPServer(srvaddr, CGIHTTPRequestHandler)
srvobj.serve_forever()