MOD_PYTHON on WEB4CE

Directory itest (/mod_python/itest)

 

.htaccess v adresáři, ve kterém bude umístěna aplikace
AddHandler mod_python .py

PythonHandler index
PythonDebug On
DirectoryIndex index.py
         
vytvoříme index.py
from mod_python import apache
from mod_python import util

def handler(req):
    req.content_type = 'text/plain'
    req.write("Hello World!\n")
    form = util.FieldStorage(req)
    if form.has_key('cosi'):
        req.write("COSI: %s" % form['cosi'].value)
    return apache.OK
         

index.py
   http://jilsoft.cz/mod_python/itest/
anyscript.py (odeslání formuáře - klíč cosi)
   http://jilsoft.cz/mod_python/itest/index.py?cosi=nic