它山之石可以攻玉

键盘上的生活
随笔 - 433, 文章 - 5, 评论 - 35, 阅读 - 90万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  ASP

摘要:如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)?JavatimeJavaScriptMath.round(new Date().getTime()/1000)getTime()返回数值的单位是毫秒Microsoft .NET / C#epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000MySQLSELECT unix_timestamp(now())PerltimePHPtime()PostgreSQLSELECT extract(epoch FROM now( 阅读全文

posted @ 2011-05-17 13:39 陈达辉 阅读(419) 评论(0) 推荐(0) 编辑

摘要:平时做网站经常要用正则表达式,下面是一些讲解和例子,仅供大家参考和修改使用:"^\d+$" //非负整数(正整数 + 0)"^[0-9]*[1-9][0-9]*$" //正整数"^((-\d+)|(0+))$" //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$" //负整数"^-?\d+$" //整数"^\d+(\.\d+)?$" //非负浮点数(正浮点数 + 0)"^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[ 阅读全文

posted @ 2011-05-16 13:58 陈达辉 阅读(323) 评论(0) 推荐(0) 编辑

摘要:点击下载,ASP+ACCESS 阅读全文

posted @ 2011-02-25 13:39 陈达辉 阅读(191) 评论(0) 推荐(0) 编辑

摘要:Server Application Error The server has encountered an error while loading2009-10-31 14:48The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for ass 阅读全文

posted @ 2011-02-23 17:14 陈达辉 阅读(260) 评论(0) 推荐(0) 编辑

摘要:<!--#include file="../inc/conn.asp"--> <%Call opendata(1)Set rs=server.CreateObject("adodb.recordset")xmlfile=server.mappath("content.xml") Set fso = CreateObject("Scripting.FileSystemObject"... 阅读全文

posted @ 2010-08-13 14:19 陈达辉 阅读(848) 评论(0) 推荐(0) 编辑

摘要:URL重写-rewrite.zip 阅读全文

posted @ 2010-04-19 09:54 陈达辉 阅读(310) 评论(0) 推荐(0) 编辑

摘要:<form action="insert.asp" method="post" enctype="multipart/form-data" name="form1" onSubmit="b1_onclick()"> <table width="500" border="1" align="center" cellpadding="0" cellspacing="0"> &l... 阅读全文

posted @ 2010-04-01 16:13 陈达辉 阅读(755) 评论(0) 推荐(0) 编辑

摘要:ASP短信群发代码 阅读全文

posted @ 2009-10-22 10:45 陈达辉 阅读(404) 评论(0) 推荐(0) 编辑

摘要:随机产生N位由数字和字母组成的密码 asp随机数<% Randomize Do While Len(pass)<12 ’随机密码位数 num1=CStr(Chr((57-48)*rnd+48)) ’0~9 num2=CStr(Chr((90-65)*rnd+65)) ’A~Z num3=CStr(Chr((122-97)*rnd+97)) ̵... 阅读全文

posted @ 2009-10-09 11:21 陈达辉 阅读(501) 评论(0) 推荐(0) 编辑

摘要:dd = Date() '今天dd = dateadd("m",1,dd) '月份加1dd = Cdate(Year(dd) & "-" & Month(dd) & "-1") '下月的第一天dd=dateadd("d",dd,-1) '本月的最后一天dd=day(dd) '本月的天数Response.Write(dd) 阅读全文

posted @ 2008-10-09 12:54 陈达辉 阅读(1312) 评论(0) 推荐(0) 编辑

摘要:set rsn=server.CreateObject("adodb.recordset")sqln="select top 1 * from vArticle where apage='"&abname&"'"rsn.open sqln,conn,1,1if not rsn.eof then'do while not rsn.eof'page_n=len(rsn("aConten... 阅读全文

posted @ 2008-04-06 11:20 陈达辉 阅读(711) 评论(0) 推荐(0) 编辑

摘要:详谈asp生成静态页方法 阅读全文

posted @ 2008-03-31 21:14 陈达辉 阅读(4241) 评论(0) 推荐(0) 编辑

摘要:1.Server.MapPath("/") 应用程序根目录所在的位置 如 C:\Inetpub\wwwroot\ 2.Server.MapPath("./") 表示所在页面的当前目录 注:等价于Server.MapPath("") 返回 Server.MapPath("")所在页面的物理文件路径 3.Server.MapPath("../")表示上一级目录 4.Server.MapPath("~/")表示当前应用级程序的目录,如果是根目录,就是根目录,如果是虚拟目录,就是虚拟目录所在的位置 如:C:\Inetpub\wwwroot\Example\ 注:等效于Server.MapPath("~")。 阅读全文

posted @ 2008-03-31 21:10 陈达辉 阅读(690) 评论(0) 推荐(0) 编辑

摘要:下载AspJpeg v1.5.0.0,然后执行下载得到的文件,安装该组件。 然后在ASP代码里增加一点点代码即可,增加的位置可以放在上传图片完成后,取得图片地址,进行修改。对于Z-Blog的使用者,直接将下面代码复制到c_system_lib.asp文件的TUpLoadFile类中的Upload函数的结尾即可实现水印功能。 1、为图片加入水印功能 Dim JpegSet Jpeg = Se... 阅读全文

posted @ 2007-04-06 15:16 陈达辉 阅读(388) 评论(0) 推荐(0) 编辑

摘要:\s';]+",Request.QueryString) then Response.Write("") Response.End() end If'Next'vbscript正则表达式测试方法 function RegExpTest(patrn, strng) Dim regEx ' 建立变量。 Set regEx = New RegExp ' 建立正则表达式。 regEx.Pa... 阅读全文

posted @ 2007-04-03 16:30 陈达辉 阅读(633) 评论(0) 推荐(0) 编辑

摘要:Array() CInt() CStr() Date() ... 阅读全文

posted @ 2007-03-28 12:09 陈达辉 阅读(290) 评论(0) 推荐(0) 编辑

摘要:修 改 新 闻 新闻样式: 中文版 文章类型: 阅读全文

posted @ 2007-03-28 11:44 陈达辉 阅读(827) 评论(0) 推荐(0) 编辑

摘要:uid = ReplaceString(checkstring,Request.Form("loginname"))upwd = ReplaceString(checkstring,Request.Form("password")) 阅读全文

posted @ 2007-03-26 11:11 陈达辉 阅读(1125) 评论(0) 推荐(0) 编辑

摘要:一、先介绍一下什么是存储过程 存储过程是利用SQL Server所提供的Tranact-SQL语言所编写的程序。Tranact-SQL语言是SQL Server提供专为设计数据库应用程序的语言,它是应用程序和SQL Server数据库间的主要程序式设计界面。它好比Oracle数据库系统中的Pro-SQL和Informix的数据库系统能够中的Informix-4GL语言一样。这类语言主要提供以下功能,让用户可以设计出符合引用需求的程序: 阅读全文

posted @ 2007-03-22 16:46 陈达辉 阅读(192) 评论(0) 推荐(0) 编辑

摘要:Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fout = fso.Createtextfile(server.mappath("..\eshop\view\"&rs("bname")),true) fout.writeline okfilefout.closeFiLePaTh = Server.MapPath(... 阅读全文

posted @ 2007-03-22 10:08 陈达辉 阅读(539) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示