美文网首页
python-cgi

python-cgi

作者: Programming | 来源:发表于2017-02-07 19:34 被阅读0次

input the following command:

wgz@wgz:/tmp/test$ python3 -m http.server --bind localhost --cgi

file cgi.html

<form action='cgi-bin/cgi_test.py' method='post'>

<p>Username</p>

<p><input type='text'></p>

<p><input type='submit'  value='Login'></p>

file cgi_test.py

#! /usr/bin/env python3

print('Content-type: text/html\n')

print('hello world')

相关文章

  • python-cgi

    input the following command: wgz@wgz:/tmp/test$ python3 -...

  • Python-CGI配置

    准备 Apache 支持 CGI 配置,如果没有配置 Apache 服务器,请参考《Mac-Apache服务器配置...

网友评论

      本文标题:python-cgi

      本文链接:https://www.haomeiwen.com/subject/nmumittx.html