之前心血來潮研究一下python3的WEB服務該如何使用
然後找到 Django
然後找到 Django 安裝方式
但是我嘗試一下
發現無法輸出中文
研究一下
發現必須要使用 bytes 改變輸出格式才可以
例如這樣
output = bytes(""" <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>測試測試測試測試</title> <body>測試測試測試</p> <p>測試測試測試測試測試測試</p> </body> </html>""",'utf-8');
給大家參考囉

留言板
歡迎留下建議與分享!希望一起交流!感恩!