发布时间:2019-08-08 07:44:18编辑:auto阅读(1876)
#基本HTTP python -m BaseHTTPServer 8080
如果当前目录有index.html 则可以直接显示
#简单HTTP 包含GET与HEAD请求 python -m SimpleHTTPServer 8080
#HTTP 包含POST请求 当前 python -m CGIHTTPServer 8080
已sh脚本为CGI程序的语言 如下: 当前目录下新建cgi-bin目录
#!/bin/bash echo "Content-Type: text/html" # HTML is following echo "" echo "<H1>This is my first CGI script</H1>" echo "Hello, world!" for((i=1;i<=100;i++)) do echo $i done
访问地址
http://localhost:8000/cgi-bin/index.sh
将输入SHELL脚本内容
上一篇: 让python支持中文
下一篇: Python - while循环
51027
50409
41023
37886
32351
29250
28130
22967
22929
21257
1131°
1836°
1482°
1419°
1706°
1509°
2170°
3741°
3671°
2583°