1、新建一個文件夾 ,在里面新建一個文件cgi–bin的文件
2、插入代碼;
print ("Content-type:text/html") print () print ('<html>') print ('<head>') print ('<meta charset="gb2312">') print ('<title>Hello Word- 我的第一個 CGI 程序!</title>') print ('</head>') print ('<body>') print ('<h2>Hello Word! 123456</h2>') print ('</body>') print ('</html>')
3、在cmd按順序寫下如下代碼:
4、然后在電腦網頁輸入如下鏈接:http://localhost:8081/cgi-bin/111.py
結果如下:
哈哈完成啦,耶