⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 greet.pl

📁 Javascript语言开发经典教程开发
💻 PL
字号:
#!/usr/bin/perl

### Require cgi-lib.pl ###

require 'cgi-lib.pl';

### Read from the standard input ###

&ReadParse(*in);
$msg = $in{'EntireMessage'};
$fileID = $in{'UniqueID'};
$recip = $in{'Recipient'};
$baseURL = $in{'BaseURL'};


### Create the greeting in a ###
### file with a unique name  ###
open(FILE, ">greet$fileID.html") || die "No can do: $!";
select(FILE);
print <<GREETING;
<HTML>
<HEAD>
	<TITLE>Your Personal Cyber Greeting</TITLE>
</HEAD>
<BODY>
	$msg
</BODY>
</HTML>
GREETING

close(FILE);
select(STDOUT);


### Generate a response for the sender ###
print "Content-type: text/html\n\n";

print <<RESPONSE;

<HTML>
<HEAD>
	<TITLE>Cyber Greeting Response</TITLE>
</HEAD>
<BODY>
<TABLE WIDTH="500">
	<TR>
		<TD>
		<H2>Congratulations!</H2>
		You have successsfully created a Cyber Greeting for <B>$recip</B>
		All you have to do is send him or her an e-mail to announce the 
		greeting. Just push the button below, and the e-mail will be on the 
		way.
		<CENTER>
		<FORM NAME="SendEmail" ENCTYPE="text/plain" ACTION="mailto:$recip?Subject=You Have A Cyber Greeting!">
		<INPUT TYPE=HIDDEN NAME="Message" VALUE="You have a Cyber Greeting. You can pick it up at $baseURL/greet$fileID.html">
		<INPUT TYPE=SUBMIT VALUE="Send CyberGreeting">
		</FORM>
		</CENTER>
		<BR>
		You might experience a delay while your e-mail software 
		contacts your mail server.
		<BR><BR>
		<A HREF="$baseURL/index.html">Return To Cyber Greeting</A>
		</TD>
	</TR>
</TABLE>
</BODY>
</HTML>

RESPONSE

exit 0;

## End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -