yuweixian4230 发表于 2011-12-21 08:44

CGI linux shell脚本 date显示时间(4)

工程代码: <a href=".http://blog.chinaunix.net/attachment/attach/22/66/62/482266624818956d3f7571b3c01797bc1972460234.rar" target="_blank" target="_blank"><img src="/blog/image/attachicons/rar.gif" align="absmiddle" border="0">&nbsp;hellw_cgi.rar </a>&nbsp; <br><br><div id="codeText" class="codeText"><ol style="margin: 0pt 1px 0pt 0pt; padding: 5px 0pt;" start="1" class="dp-css"><li><span style="color: rgb(0, 0, 0);">#<span style="color: rgb(0, 0, 204);">!</span><span style="color: rgb(0, 0, 204);">/</span>bin<span style="color: rgb(0, 0, 204);">/</span>bash<br></span></li><li>
<br></li><li>
echo Conten<span style="color: rgb(0, 0, 204);">-</span>Type<span style="color: rgb(0, 0, 204);">:</span>text<span style="color: rgb(0, 0, 204);">/</span>plain<br></li><li>
echo<br></li><li>
echo<br></li><li>
<span style="color: rgb(0, 0, 204);">/</span>bin<span style="color: rgb(0, 0, 204);">/</span><span style="color: rgb(255, 0, 0);">date</span></li></ol></div><br><font size="4">&nbsp;&nbsp;&nbsp; 在所有CGI程序中,第一句必须输出HTML头来告诉浏览器这是一个什么样的内容,这个头是服务器与浏览器之间的信息协议并不属于文本的一部分其实Contet-Type指定的就是MIME信息。有三个类型的头部:Contet-Type,Location,Status。Contet-Type最为常用</font><br><a href="http://blog.chinaunix.net/attachment/201106/29/22666248_1309326220jLEJ.jpg" target="_blank" target="_blank"><img src="http://blog.chinaunix.net/attachment/201106/29/22666248_1309326220jLEJ.jpg" .load="imgResize(this, 650);" ;="" border="0"></a><br><br><font color="#800080" size="5"><br>Content-Type行后必须接两个空行,不然浏览器不能正确的认<br><br>出内容类型来。</font><br><br><a href="http://blog.chinaunix.net/attachment/201106/29/22666248_1309326257PJM4.jpg" target="_blank" target="_blank"><img src="http://blog.chinaunix.net/attachment/201106/29/22666248_1309326257PJM4.jpg" .load="imgResize(this, 650);" ;="" border="0"></a><br><br>
页: [1]
查看完整版本: CGI linux shell脚本 date显示时间(4)