0
我有標準的13.10 Ubuntu。運行Apache 2和mod_python。兩者都使用apt-get進行安裝。我試圖從客戶端傳遞GET變量到服務器,執行python腳本,然後返回結果。Mod_python沒有獲取GET變量
這裏是我的ApacheConfig(默認加上下面的代碼):
ScriptAlias /tm/ "/home/tm/"
<Directory /home/tm/ >
Require all granted
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
Python代碼:test.py
import csv
def index():
form = cgi.FieldStorage()
return form
我試圖http://myWebsite.com/tm/test.py?testVariable=This
回報:的FieldStorage(無,無,[]) - 意味着GET變量未被傳遞河
爲什麼使用mod_python開發新代碼? –
@ Ignacio。抱歉,不明白你的意思。 – Darthyogurt
mod_python已經死了3.5年。爲什麼*任何人*編寫使用它的代碼? –