如何恢复用户的地址服务器,将其放入变量并在命令行中执行

时间:2014-07-08 10:08:18

标签: python linux

scriptInfo.py

import os, sys, platform, webbrowser



def main()

  template = open('scriptHmtl.phtml').read()

scriptHtml.phtml

<html>
<head>
</head>
<body>
<h2><center> welcome </center></h2>
<br/><br/><br/>

...
variables
..

<form name="sendData" method="get" action="http://localhost:8000/cgi/scriptGet.py">
    Name: <input type="text" name="n"><br/><br/>
    First Name: <input type="text" name="fn"/><br/><br/>
    Mail: <input type="text" name="ma"/><br/><br/>
    Address: <input type="text" name="add"/> <br/><br/>
    <input type="submit" value="OK"/>
</form>

而不是action="http://localhost:8000/cgi/scriptGet.py",必须有一个变量,其中包含恢复服务器地址的代码,但我不想知道如何执行此操作。

1 个答案:

答案 0 :(得分:0)

使用HTML表单,您可以忽略服务器并直接进入脚本。

例如

<form name="sendData" method="get" action="cgi/scriptGet.py">