时间: 2021-07-31 作者:daque
回应剧本 这段剧本将表露输出到html form中的文本。它是一个消息怎样传播给你的步调的大略的例子。既是你此刻仍旧有了一个有着精确的perl和senmail的路途的template.txt文献,底下要做的不过编纂cgi的body局部。 正片底下剧本的body局部到template.txt,而后生存到一个新文献"test2.cgi"中。 ftp test2.cgi到perltour文献夹(或cgi-bin)中。 而后在unix提醒符下,加入perltour(或cgi-bin)文献夹,敲入chmod a+rx test2.cgi树立权力。 此刻不妨在你的欣赏器中翻开效劳器上的testform.htm,尝试这个form。当你弥补这个form并按"test it"时,cgi报告你你输出了什么。 -------------------------------------------------------------------------------- #!/usr/local/bin/perl # &readparse; print "content-type: text/html\n\n"; # #*****************begin body************* print "<h1>thank you for filling out the form</h1>"; $firstname = $value[0]; $lastname = $value[1]; $email = $value[2]; print "your first name is $firstname<br>"; print "your last name is $lastname<br>"; print "your e-mail is $email<br>"; #***************end body******************