创建购物车 create table carts( id int unsingned primary key auto_INCREMENT, customer_id int ...
创建购物车 create table carts( id int unsingned primary key auto_INCREMENT, customer_id int ...
结果含义表示 200 OK 资源有,成功 404资源不存在 500服务器内部错误 闭包 闭包的本质就是函数嵌套,就是在函数里面定义函数, 内部函数可以引用外部函数的参数和变量...
---------copyright 版权----------- 运行方式 ./13run.sh 或者 python web_server.py 7890 mini_fram...
python web_server.py 7890 mini_frame:application #执行时 # $ ./run.sh # 没反应,查一下权限 # ls -lh...
{ 'static_path:'./static', 'dynamic_path':'./dynamic' }
import sys print(sys.argv) # 运用此程序方式 # python 11给程序传参数.py 7890 mini_frame:application
import socket import re import multiprocessing import time import dynamic.mini_frame im...
from pymysql import connect def main(): #创建Connection连接 conn = connect(host = 'loca...
def index(): with open('./templates/index.html','r',encoding='utf-8') as f : return...
import socket import re import multiprocessing import time import mini_frame class WSGI...
def index(): return '这是主页' def login(): return '这是登陆页' def application(environ, start_r...
import socket import re import multiprocessing import time import mini_frame class WSGI...
def application(environ, start_response): start_response('200 OK', [('Content-Type', ...
import socket import re import multiprocessing import time import mini_frame class WSGI...
通过def application ()将Header 传到def set_respomse_header 再通过数据库 返回return body
import time def login(): return'---login---welcome hahaha to our website......time:%s'%...
定义WSGI接口 def application(environ, start_response):start_response('200 OK', [('Content-T...
import socket import re import multiprocessing class WSGIServer(object): def _init_(s...