Python (10) 썸네일형 리스트형 cgi 설정 youtu.be/BEghLFbPtDk?list=PLuHgQVnccGMDMxfZEpLbzHPZUEwObEaZq 아파치 웹서버와 파이썬을 서로 연동되게 하려고 한다. 이렇게 웹 서버와 어플리케이션을 연동할때 사용하는 표준화된 방법을 cgi. common gateway interface 라고 부른다. httpd.conf 파일을 백업해놓는다. httpd.conf 파일에서 LoadModule cgi_module modules/mod_cgi.so 앞에 # 제거 DocumentRoot "C:/Bitnami/wampstack-7.4.8-0/apache2/htdocs" 디렉토리 설정 Require all granted 다음에 Options ExecCGI AddHandler cgi-script .py 입력 아파치 웹서버 .. 파이썬 한글 깨짐 해결 import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8') sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8') 또는 # -*- encoding:utf-8-*- 이전 1 2 다음