﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-我的cnit空间 asp空间</title><link>http://www.cnitblog.com/woshigj/</link><description>我是永远的asp冠军</description><language>zh-cn</language><lastBuildDate>Wed, 29 Apr 2026 05:59:51 GMT</lastBuildDate><pubDate>Wed, 29 Apr 2026 05:59:51 GMT</pubDate><ttl>60</ttl><item><title>简单第说下WAP与PHP这门语言之间的密切关系</title><link>http://www.cnitblog.com/woshigj/archive/2012/02/10/77548.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Fri, 10 Feb 2012 05:55:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2012/02/10/77548.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/77548.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2012/02/10/77548.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/77548.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/77548.html</trackback:ping><description><![CDATA[<div><div></div><div></div><div>　　WAP的发展离不开其WWW的底蕴，毕竟，整个WAP协议的制定参照了WWW的模型，并且尽可能地沿用了Internet的诸多标准和技术，如WML语言脱胎于HTML与xml，WMLScript与传统的脚本语言也很相似。的确，WAP虽然是个新名词，但是它却与传统的国际互联网密不可分地结合着，在结构上如此，在技术上更是如此。&nbsp;</div><div>　　&nbsp;</div><div>　　　　&nbsp;</div><div>　　之所以使用PHP来提供WAP服务，除了它灵活的特点外，还由于PHP可以方便的使用数据库。用户可以使用PHP存取Oracle、Sybase、MS SQL、MySQL、dBase、Informix等任何支持ODBC标准的数据库，这点正好迎合了WAP商务的需求。 　　&nbsp;</div><div>　　在实用中，一般需要建立PHP文件，当用户向服务器发出浏览该PHP文件的请求时，服务器将根据文件中的代码产生相应的HTML或WML内容，并发送给浏览器或WAP终端。 　　&nbsp;</div><div>　　如想获取关于PHP的信息，可以前往http://www.php.com查看。 &nbsp;</div><div>　　目前最流行的网页编程语言和数据库的搭配是什么？相信很多人会说出"php"与"MySQL"这两个名字。它们属于WWW或者有线互联网的范畴，由于使用方便与功能强大的特点而美名传播，那么它们能够为WAP服务吗？答案是肯定的。不熟悉WAP或者PHP的人或许有些不解，毕竟在传统意义上PHP提供的是WWW的内容与服务，对于WAP，它们能"兼容"吗？&nbsp;</div><div>　　PHP粗解&nbsp;</div><div>　　看了WAP的介绍，大家应该开始逐步理解PHP为何仍能为WAP服务了。PHP与HTML、WML、javascript、Java都不一样，它是在服务器端运行的，而Javascript、Java等都运行在浏览器端，相对于WAP，WMLScript运行于客户机端，但是，以上的这些语言都可以很容易与PHP结合起来。 　　&nbsp;</div><div>　　PHP具有很大的灵活性，在WWW中，它可以生成所需要的任何HTML代码，甚至Javascript代码。同样，在WAP中，我们仍然可以利用PHP这种动态、灵活的特点，生成任意的WML代码，这样，PHP自然能够为WAP服务。 　　&nbsp;</div><div></div><div>　　在WAP协议中提到WAP页面所使用的标记语言为WML，当需要进行较高级的操作，如使用终端机的某些资源时，可以使用WMLScript脚本语言，这两种语言很简单，甚至可以用简陋来形容，特别是它们对数据库的操作几乎无能为力，这种"缺陷"与WAP广阔的商务和应用前景格格不入，但我们并不是无能为力的，由于WAP和WWW的交融，我们仍然可以使用WWW的技术与资源来解决数据库的访问问题，因为毕竟多数数据库仍处于有线网络内。&nbsp;</div><div>　　PHP－WML&nbsp;</div><div>　　PHP的系统平台、工作方式、安装方法，这些都不在本文的讨论范围内，毕竟我们的重点是PHP如何与WAP协作。一般而言，为了能让PHP工作，我们需要带有PHP模块的Web服务器，或者说支持PHP的服务器，Apache是世界上最流行的Web服务器，另外，我们还需要安装PHP软件以及如MySQL这样的数据库，具体内容可以查阅相关书籍或网站。下面我们讨论如何让PHP产生WML代码。&nbsp;</div><div>　　&nbsp;</div><div>　　在WWW中，PHP产生的第一行内容往往是： content-type: text/html&nbsp;</div><div>　　&nbsp;</div><div>　　但是，WAP终端是读不懂这样的标题的。WAP终端从服务器下载的单位是Deck，浏览的单位是Card，一般一个Deck就组成一个WML文件。那么，为WAP服务时，PHP文件中往往需要包含如下的代码：&nbsp;</div><div>　　header("Content-type:text/vnd.wap.wml");&nbsp;</div><div>　　echo "＜xml version=\"1.01"＞\n"&nbsp;</div><div>　　echo"＜! DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\"http://www.wapforum.org//DTD//wml_1.1.xml\"＞\n";&nbsp;</div><div>　　以上三行代码产生了WML文件（Deck）的文件头，这样WAP终端就可以识别所下载的Deck是否WML格式，并且接着显示余下的Deck内容。&nbsp;</div><div>　　&nbsp;</div><div>　　下面是一个最简单的Deck，它在WAP终端上显示"Hello World"。&nbsp;</div><div>　＜?xml version="1.0" encoding="ISO-8859-1"?＞ ＜! DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml"＞&nbsp;</div><div>　　＜/xml＞&nbsp;</div><div>　　＜!--Nokia Parser Info:Phone = Nokia 7110; Height = 90; Width = 130; CurrentDeckSize = 38; MaxDeckSize = 1600; CardsOnEachLine = 5; CardsVerticalGap = 30--＞&nbsp;</div><div>　　＜/card id="card1" ordered="true" newcontext="false"＞&nbsp;</div><div>　　＜p align="left"＞&nbsp;</div><div>　　Hello World&nbsp;</div><div>　　＜/p＞&nbsp;</div><div>　　＜/card＞&nbsp;</div><div>　　＜/wml＞&nbsp;</div><div>　　我们建立的相应的PHP文件如下：&nbsp;</div><div>　　＜?php&nbsp;</div><div>　　header("Content-type:text/vnd.wap.wml");&nbsp;</div><div>　　echo "＜?xml version=\"1.0\"＞\n";&nbsp;</div><div>　　echo "＜!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org//DTD//wml_1.1.xml\"＞\n";&nbsp;</div><div>　　echo "\n";&nbsp;</div><div>　　echo "＜!--Nokia Parser Info: Phone = Nokia 7110; Height = 90; Width = 130; CurrentDeckSize = 38; MaxDeckSize = 1600; CardsOnEachLine = 5; CardsVerticalGap = 30--＞\n";&nbsp;</div><div>　　echo "＜card id=\"card1\" ordered=\"true\" newcontext=\"false\"＞ ";&nbsp;</div><div>　　echo "＜p align=\"left\"＞\n";&nbsp;</div><div>　　echo "Hello World";&nbsp;</div><div>　　echo "＜/p＞";&nbsp;</div><div>　　echo "＜/card＞";&nbsp;</div><div>　　echo "＜/wml＞";&nbsp;</div><div>　　?＞&nbsp;</div><div>　　我们可以将该文件存为index.php3，当WAP终端浏览该网站时，Web服务器会自动根据index.php3的内容产生如上所列的WML内容，并发送给网关进行处理。WAP终端收到该Deck后，将会在显示屏上显示"Hello World"的字样。&nbsp;</div><div>　　&nbsp;</div><div>　　以上是关于PHP在WAP中最简单的应用，它只是简单地产生若干行WML代码，并没有牵扯到数据库的访问。其实，PHP强大的功能可以为WAP提供很丰富的服务，而最值得挖掘的就是其强大的数据库支持，这些将在以后的文章中讨论。&nbsp;</div></div><img src ="http://www.cnitblog.com/woshigj/aggbug/77548.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2012-02-10 13:55 <a href="http://www.cnitblog.com/woshigj/archive/2012/02/10/77548.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>风雨之见 学了JSP，不会用JAVA BEAN并进行整合，等于没学</title><link>http://www.cnitblog.com/woshigj/archive/2012/01/12/77168.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Thu, 12 Jan 2012 07:15:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2012/01/12/77168.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/77168.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2012/01/12/77168.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/77168.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/77168.html</trackback:ping><description><![CDATA[<div><div>&nbsp; 如果想修改一个地方，经常会牵涉到十几页CODE，采用组件技术就只改组件就可以了。</div><div>综上所述，SERVLET是一个早期的不完善的产品，写business layer很好，写presentation layer就很臭，并且两层混杂。</div><div>&nbsp; 所以，推出JSP+BAEN，用JSP写presentation layer,用BAEN写business layer。SUN自己的意思也是将来用JSP替代SERVLET。</div><div>&nbsp; 可是，这不是说，学了SERVLET没用，微软分拆后，操作系统将群雄并起，应用软件的开发商必定要找一个通用开发语言进行开发，JAVA一统天下的时机就到了。如果微软分拆顺利，从中分出的应用软件公司将成为JAVA的新领导者。　</div><div>JSP和SERVLET到底在应用上有什么区别，很多人搞不清楚。这样，就大大简化和方便了网页的设计和修改。新型的网络语言如ASP，PHP，JSP都是镶嵌型的SCRIPT语言。</div><div>&nbsp; 从网络三层结构的角度看，一个网络项目最少分三层：data layer,business layer, presentation layer。当然也可以更复杂。SERVLET用来写business layer是很强大的，但是对于写presentation layer就很不方便。JSP则主要是为了方便写presentation layer而设计的。当然也可以写business layer。写惯了ASP，PHP，CGI的朋友，经常会不自觉的把presentation layer和business layer混在一起。就象前面那个朋友，把数据库处理信息放到JSP中，其实，它应该放在business layer中。</div><div>&nbsp; 根据SUN自己的推荐，JSP中应该仅仅存放与presentation layer有关的东东，也就是说，目前的JAVA大头SUN和IBM都死气沉沉，令人失望。希望新公司能注入新活力。不过，新公司很有可能和旧SUN展开JAVA标准大战，双方各自制定标准，影响JAVA夸平台。 &nbsp;那么，为什么还用JSP+BEAN？因为JAVA实在前途远大。</div><div>&nbsp; 另外一方面，纯SCRIPT语言将presentation layer和business layer混在一起，造成修改不方便，并且代码不能重复利用。实际上，你还是应该从SERVLET入门，再上JSP，再上JSP+BEAN。</div><div>&nbsp; 强调的是：学了JSP，不会用JAVA BEAN并进行整合，等于没学。大家多花点力气在JSP+BEAN上。</div><div>在补充几句：我来胡扯几句吧。简单的说，SUN首先发展出SERVLET，其功能比较强劲，体系设计也很先进，只是，它输出HTML语句还是采用了老的CGI方式，是一句一句输出，所以，编写和修改HTML非常不方便。 实际上，微软前不久推出的DNA技术，简单说，就是ASP+COM/DCOM技术。与JSP+BEANS完全类似，所有的presentation layer由ASP完成，所有的business layer由COM/DCOM完成。通过调用，实现整合。</div><div>&nbsp; 后来SUN推出了类似于ASP的镶嵌型的JSP，把JSP TAG镶嵌到HTML语句中，只放输出HTML网页的部份。而所有的数据计算，数据分析，数据库联结处理，统统是属于business layer，应该放在JAVA BEANS中。通过JSP调用JAVA BEANS，实现两层的整合。&nbsp;</div><div>为什么要采用这些组件技术呢？因为单纯的ASP/JSP语言是非常低效率执行的，如果出现大量用户点击，纯SCRIPT语言很快就到达了他的功能上限，而组件技术就能大幅度提高功能上限，加快执行速度。 &nbsp;我们可以看到，当ASP+COM和JSP+BEAN都采用组件技术后，所有的组件都是先进行编译，并驻留内存，然后快速执行。所以，大家经常吹的SERVLET/JSP先编译驻内存后执行的速度优势就没有了。</div><div>反之，ASP+COM+IIS+NT紧密整合，应该会有较大的速度优势呈现。而且，ASP+COM+IIS+NT开发效率非常高，虽然BUG很多。</div></div><div></div><img src ="http://www.cnitblog.com/woshigj/aggbug/77168.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2012-01-12 15:15 <a href="http://www.cnitblog.com/woshigj/archive/2012/01/12/77168.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php的一些特性 谁人知晓 我们来看下哦</title><link>http://www.cnitblog.com/woshigj/archive/2012/01/12/77167.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Thu, 12 Jan 2012 04:59:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2012/01/12/77167.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/77167.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2012/01/12/77167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/77167.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/77167.html</trackback:ping><description><![CDATA[<div><div>　　虽然PHP在Apache里能快速运行，但是在PHP网站里有一些用来对Microsoft IIS 和Netscape Enterprise Server无缝结合的指令集。如果您还没有copy PHP的话，您可以在 www.php.com 下载，您也可以使用操作手册，它里边包括了所有的关于PHP的功能和特性的说明。 &nbsp;PHP是一个基于服务端来创建动态网站的脚本语言，您可以用PHP和HTML生成网站主页。当一个访问者打开主页时，服务端便执行PHP的命令并将执行结果发送至访问者的浏览器中，这类似于ASP和CoildFusion，然而PHP和他们不同之处在于PHP开放源码和跨越平台，PHP可以运行在WINDOWS NT和多种版本的UNIX上，运行代码不需要调用外部二进制程序，服务器不需要承担任何额外.PHP的编程语言类似与C和Perl。在使用它们之前您没必要声明任何变量，而且建立数组和Hash是很简单的事情。PHP还有一些面向对象的特征，可以为组织和打包您的代码提供很好的帮助。。它不需要任何预先处理而快速反馈结果，它也不需要mod_perl的调整来使您的服务器的内存映象减小。PHP消耗的资源较少，当PHP作为Apache Web服务器一部分时</div><div>了PHP就无需特殊的开发环境和IDE，您可以以&lt;？php 作为程序块的开始，可以以 ？&gt;作为PHP代码块的结束，当然您也可以用带有&lt;% %&gt;的标记甚至用的ASP的格式来配置PHP，PHP会在那些标志间处理所有的事情。</div><div>　　除了能够操作您的页面外，PHP还能发送HIIP的标题。您可以设置cookie,管理数字签名和重定向用户，而且它提供了极好的连通性到其它数据库(还有ODBC)，集成各种外部库来做用PDF文档解析XML的任何事情。</div></div><img src ="http://www.cnitblog.com/woshigj/aggbug/77167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2012-01-12 12:59 <a href="http://www.cnitblog.com/woshigj/archive/2012/01/12/77167.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>asp实现页面的自动登录</title><link>http://www.cnitblog.com/woshigj/archive/2012/01/10/77144.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Tue, 10 Jan 2012 09:53:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2012/01/10/77144.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/77144.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2012/01/10/77144.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/77144.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/77144.html</trackback:ping><description><![CDATA[<div><p style="padding-top: 0px; padding-bottom: 0px; font-family: Verdana, 'Microsoft YaHei', Arial, Helvetica, sans-serif; color: #444444; font-size: 14px; line-height: 25px; ">我们在制作网站时通常想设置用户登陆系统，也就是说当用户登陆之后可以看到相应的内容，这种方法被经常使用了，具体的实现的流程图：</p><p align="center" style="padding-top: 0px; padding-bottom: 0px; font-family: Verdana, 'Microsoft YaHei', Arial, Helvetica, sans-serif; color: #444444; font-size: 14px; line-height: 25px; "></p><p align="left" style="padding-top: 0px; padding-bottom: 0px; font-family: Verdana, 'Microsoft YaHei', Arial, Helvetica, sans-serif; color: #444444; font-size: 14px; line-height: 25px; ">　　具体ＡＳＰ源代码如下：（包括３个文件）</p><p style="padding-top: 0px; padding-bottom: 0px; font-family: Verdana, 'Microsoft YaHei', Arial, Helvetica, sans-serif; color: #444444; font-size: 14px; line-height: 25px; ">　　<strong style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">login.asp</strong></p><p style="padding-top: 0px; padding-bottom: 0px; font-family: Verdana, 'Microsoft YaHei', Arial, Helvetica, sans-serif; color: #444444; font-size: 14px; line-height: 25px; ">&lt;%@ Language="vbscript" %&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;% Option Explicit %&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;% Response.Buffer = True %&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;!--#include file="dbConn.asp"--&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;%<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Was the form submitted?<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' If so, lets check the Username and Password<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />If Request.Form("Submitted") = "login" Then<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Declare our variables<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Dim objConn, objRS, strSQL<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Create Connection Object<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objConn = Server.CreateObject("ADODB.Connection")<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objConn.Open strConnect<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Build SQL String<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />strSQL = "SELECT * FROM MemberInfo WHERE Username='" &amp; Request.Form("Username") &amp; "'"<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Create Recordset Object<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objRS = Server.CreateObject("ADODB.Recordset")<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objRS.Open strSQL, objConn<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " /><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />If objRS.EOF Then<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Does the Username exist?<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' If not, set strFailed and destroy all objects.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' We'll then display the login form again.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />strFailed = "Invalid Username"<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objRS.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objRS = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objConn.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objConn = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Else<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Username exists - is the password correct?<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' If not, set strFailed and destroy all objects.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' We'll then display the login form again.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />If objRS.Fields("Password") &lt;&gt; Request.Form("Password") Then<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />strFailed = "Invalid Password"<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objRs.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objRS = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objConn.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objConn = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Else<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Username and password are valid.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Set session variable.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Destroy all objects.<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />' Redirect to secret page<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />'================================================<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Session("ValidUser") = "true"<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objRS.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objRS = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />objConn.Close<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Set objConn = Nothing<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Response.Redirect "secret-page.asp"&nbsp;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />End If<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />End If<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />End If<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />%&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />"http://www.w3.org/TR/html4/strict.dtd"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;html lang="en"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;head&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;title&gt;会员登陆系统&lt;/title&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/head&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;body&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;h1&gt;Login Area&lt;/h1&gt;&lt;%<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />If strFailed &lt;&gt; "" Then<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />Response.Write "&lt;p&gt;" &amp; strFailed &amp; "&lt;/p&gt;" &amp; vbCrLf<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />End If<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />%&gt;&lt;form method="post" action="login.asp"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;label for="username"&gt;用户名:&lt;/label&gt;&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;input type="text" id="username name="username"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;label for="password"&gt;密码:&lt;/label&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;input type="password" id="password" name="password"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;input type="submit" name="Submitted" value="login"&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/p&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/form&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/body&gt;<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />&lt;/html&gt;</p></div><img src ="http://www.cnitblog.com/woshigj/aggbug/77144.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2012-01-10 17:53 <a href="http://www.cnitblog.com/woshigj/archive/2012/01/10/77144.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我也来说说对404页面的认识</title><link>http://www.cnitblog.com/woshigj/archive/2011/10/19/76112.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Wed, 19 Oct 2011 05:57:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2011/10/19/76112.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/76112.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2011/10/19/76112.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/76112.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/76112.html</trackback:ping><description><![CDATA[<br /><span style="color: #000000; ">
&nbsp;404页面的目的是：告诉浏览者其所请求的页面不存在或链接错误，同时引导用户使用网站其他页面而不是关闭窗口离开。<br />
404页面的制作方法：很多新手都会认为，404页面本身就是错误的，为什么我们还要去制作他了？404页面就是当用户输入了错误的链接时，返回的页面。404页面的目的是：告诉浏览者其所请求的页面不存在或链接错误，同时引导用户使用网站其他页面而不是关闭窗口离开。<br /></span><span class="Apple-style-span" style="background-color: #ffffff; ">如何实现一个良好的404页：</span><span style="color: #000000; "><br />
自定义404错误页面是增强用户体验的很好的做法，但在应用过程中往往并未注意到对搜索引擎的影响，譬如：错误的服务器端配置导致返回&#8220;</span><span style="color: #000000; ">200</span><span style="color: #000000; ">&#8221;状态码或自定义404错误页面使用Meta&nbsp;Refresh导致返回&#8220;</span><span style="color: #000000; ">302</span><span style="color: #000000; ">&#8221;状态码。正确设置的自定义404错误页面，不仅应当能够正确地显示，同时，应该返回&#8220;</span><span style="color: #000000; ">404</span><span style="color: #000000; ">&#8221;错误代码，而不是&nbsp;&#8220;</span><span style="color: #000000; ">200</span><span style="color: #000000; ">&#8221;或&#8220;</span><span style="color: #000000; ">302</span><span style="color: #000000; ">&#8221;。虽然对访问的用户而言，HTTP状态码究竟是&#8220;</span><span style="color: #000000; ">404</span><span style="color: #000000; ">&#8221;还是&#8220;</span><span style="color: #000000; ">200</span><span style="color: #000000; ">&#8221;来说并没有什么区别，但对搜索引擎这则是相当重要的。<br />
搜索引擎蜘蛛在请求某个URL时得到&#8220;</span><span style="color: #000000; ">404</span><span style="color: #000000; ">&#8221;状态回应时，即知道该URL已经失效，便不再索引该网页，并向数据中心反馈将该URL表示的网页从索引数据库中删除，当然，删除过程有可能需要很长时间；而当搜索引擎得到&#8220;</span><span style="color: #000000; ">200</span><span style="color: #000000; ">&#8221;状态码时，则会认为该url是有效的，便会去索引，并会将其收录到索引数据库，这样的结果便是这两个不同的url具有完全相同的内容,而导致出现复制网页问题，严重影响搜索引擎对网站的索引。<br />
本文由<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: 14px; background-color: #ffffff; "><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;"><a href="http://www.serveprint.com/" target="_blank">广州天河印刷厂</a>站长投稿，请务必保留链接转载谢谢！</span></span><br /><br /><br /></span><img src ="http://www.cnitblog.com/woshigj/aggbug/76112.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2011-10-19 13:57 <a href="http://www.cnitblog.com/woshigj/archive/2011/10/19/76112.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP+ACCESS英文博客程序</title><link>http://www.cnitblog.com/woshigj/archive/2009/11/29/62899.html</link><dc:creator>我是冠军</dc:creator><author>我是冠军</author><pubDate>Sun, 29 Nov 2009 15:07:00 GMT</pubDate><guid>http://www.cnitblog.com/woshigj/archive/2009/11/29/62899.html</guid><wfw:comment>http://www.cnitblog.com/woshigj/comments/62899.html</wfw:comment><comments>http://www.cnitblog.com/woshigj/archive/2009/11/29/62899.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/woshigj/comments/commentRss/62899.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/woshigj/services/trackbacks/62899.html</trackback:ping><description><![CDATA[<h1>ASP+ACCESS<strong style="color: black; background-color: #ffff66">英文</strong><strong style="color: black; background-color: #a0ffff">博客</strong><strong style="color: black; background-color: #99ff99">程序</strong></h1>
<h1>&nbsp;</h1>
<h1>软件大小：56KB <br />
运行环境：ASP+ACCESS <br />
软件语言：简体中文 <br />
软件授权：免费软件 <br />
收录/更新：2008-11-26/2008-11-30 <br />
预览图片： <a href="http://www.codepub.com/u/img/software1/2008-11-26_223720.gif" target="_blank"><font color="#800080"><u>主页</u></font></a><br />
<br />
由于要帮一个软件工程专业的同学做一个作业，所以做了一个简单的ASP<font style="background-color: #99ff99" color="#000000">程序，应用在这个网站：<a href="http://jp-nsakura777.com/">スーパーコピー</a></font>，虽然功能不完善，但对于初学者也许有所帮助，用作学习参考！<br />
这个简单<strong style="color: black; background-color: #a0ffff">博客</strong><strong style="color: black; background-color: #99ff99">程序</strong>是在我给同学做的一个简单<strong style="color: black; background-color: #99ff99">程序</strong>的基础上完成的,<br />
主要作了以下修改:<br />
1. 添加了文章分布功能<br />
2. <strong style="color: black; background-color: #a0ffff">博客</strong>设置<br />
3. MD5密码加密<br />
4. 文章摘要标签<br />
<br />
原文载<span class="Apple-style-span" style="color: #000000; font-family: Simsun; font-weight: normal; background-color: #ffffff; font-size: medium; ">&nbsp;<a href="http://www.4D198.com/">4D影院设备</a></span></h1>
<div>&nbsp;</div>
<img src ="http://www.cnitblog.com/woshigj/aggbug/62899.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/woshigj/" target="_blank">我是冠军</a> 2009-11-29 23:07 <a href="http://www.cnitblog.com/woshigj/archive/2009/11/29/62899.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>