當前位置:首頁 » 編程語言 » 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'

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:713
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:979
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:687
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:840
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:746
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:1086
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:314
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:194
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:882
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:841