1) Simple procedure, reference several key processing can:
#coding =utf-8#!/usr/bin/python# CGI processing module from OS import environimport CGI, cgitb# creates fieldstorage instantiation form = cgi. Fieldstorage () # gets data user_id = "A";p assword= "B"; first_name = Form.getvalue (' first_name ') last_name = Form.getvalue (' Last_Name ') en = environ.get (' http_cookie ') + ""; coks = En.split (';') For C in coks:kv = C.split ("="); if (kv[0]== ' UserID '): user_id=kv[1]; Continue if (kv[0]== ' Password '): password=kv[1]; Print (' content-type:text/html\r\n\r\n ') print ("set-cookie:userid=xyz;\r\n") print ("set-cookie:password=xyz123;\r \ n ") print (" Set-cookie:expires=tuesday, 31-dec-2007 23:12:40 gmt\ "; \ r \ n") print ("set-cookie:domain=www.w3cschool.cc \ \ r \ n ") print (" set-cookie:path=/perl;\n ") print ('
2) configuration is critical (IIS7.0):
3) press below to fill in the following:
It's no big difference to go here and deal with the C # language. Python is a better type of script to serve as a data provider for the server.
Python language in many places, especially the type, class and other aspects with JS very similar, but no JS complex.
Read it over again, can I get to a language?
Python Web programming (CGI)