first.cgi

来自「HTML语言的例子」· CGI 代码 · 共 43 行

CGI
43
字号
#!/bin/sh

# Tell server that the program is generating an HTML document.
echo Content-type: text/html
echo

# Define variable to specify the date program.
PROG=/usr/bin/date

# Generate appropriate HTML to start the document.
cat << EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>
EOF

echo "$PROG Response Page"

cat << EOF
</TITLE>
</HEAD>
<BODY>
<H1>
EOF

echo "$PROG Response Page"

cat << EOF
</H1>
<HR>
EOF

# Execute the program and format the results using a <PRE> element.
echo \<PRE\>
$PROG
echo \</PRE\>

# Close the document with appropriate HTML elements.
cat << EOF
</BODY></HTML>
EOF

⌨️ 快捷键说明

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