當前位置:首頁 » 編程語言 » iis配置python

iis配置python

發布時間: 2024-02-24 10:40:27

❶ 如何在IIS中執行python腳本

對於
Active
Server
Pages
(ASP)
以及簡單通用網關介面
(CGI)
腳本,IIS使用
WindowsScriptingHost
解析VBScript

JScript
,
IIS
可以使用其他腳本解釋程序。
本文介紹如何使用
Python
作為腳本語言是選擇用於
CGI

ASP。在IIS管理器「網站」節點上點擊右鍵,選擇「屬性」「主目錄」,點擊「配置」按鈕,在「映射」中點擊「添加」,在對話框中將「可執行文件」設置為「/python.exe
%s
%s」,擴展名為「.py」,動作為「全部動作」,然後點擊確定。IIS現在就能解析py了嗎?編寫一個test.py文件:print
print
'Status:
200
OK'
print
'Content-type:
text/html'printprint
'Python
Sample
CGI'
print
''
print
'This
is
a
header'
print
''
#this
is
a
comment
print
'See
this
is
just
like
most
other
HTML'

熱點內容
單片機c語言取反 發布:2025-09-08 08:34:41 瀏覽:906
ade源碼 發布:2025-09-08 08:28:24 瀏覽:822
平板清理王者緩存 發布:2025-09-08 08:25:35 瀏覽:187
畫星號編程 發布:2025-09-08 08:20:35 瀏覽:116
我的世界伺服器帥氣的主城 發布:2025-09-08 08:11:06 瀏覽:151
我的世界伺服器在哪手機版 發布:2025-09-08 07:35:37 瀏覽:627
解壓扔瓶子 發布:2025-09-08 07:22:15 瀏覽:524
我的世界伺服器扣金幣 發布:2025-09-08 07:12:49 瀏覽:124
怎麼知道車型配置 發布:2025-09-08 06:57:46 瀏覽:612
安卓如何避免軟體一直掃描內存 發布:2025-09-08 06:52:52 瀏覽:283