Skip to content

Commit 6a04c0f

Browse files
author
lan-air
committed
fix read html file code
1 parent 6bd7f31 commit 6a04c0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
if not os.path.exists('./static'):
1919
os.makedirs('./static')
2020
app.mount("/static", StaticFiles(directory="static"), name="static")
21-
index_html = open('templates/index.html', 'r').read()
22-
admin_html = open('templates/admin.html', 'r').read()
21+
index_html = open('templates/index.html', 'r', encoding='utf-8').read()
22+
admin_html = open('templates/admin.html', 'r', encoding='utf-8').read()
2323
# 过期时间
2424
exp_hour = 24
2525
# 允许错误次数

0 commit comments

Comments
 (0)