浏览模式: 普通 | 列表
5月, 2006 | < | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | >

asp中动态include的方法

[ 2006-05-27 11:41:35 | 作者: admin ]
推荐
==================
asp动态include文件
使用范例:include("youinc.asp")
<%
Function include(filename)
Dim re,content,fso,f,aspStart,aspEnd
set fso=CreateObject("Scripting.FileSystemObject")
set f=fso.OpenTextFile(server.mappath(filename))
content=f.ReadAll
f.close
set f=nothing
set fso=nothing
set re=new RegExp
re.pattern="^\s*="
aspEnd=1
aspStart=inStr(aspEnd,content,"<%")+2
do while aspStart>aspEnd+1
Response.write ...

阅读全文…
mysql: select * from tablename order by rand() limit 10
sqlserver: select top 10 * from tablename order by NEWID()

说明:
NEWID
创建 uniqueidentifier 类型的唯一值。

语法
NEWID ( )

返回类型
uniqueidentifier

例如:
我要随机取数据库里的信息10条,如果你的数据库是sqlserver的话,可用这样的方法:
select top 10 * from tablename order by newid()

在ASP编程中使用数组

[ 2006-05-27 11:28:46 | 作者: admin ]
在ASP编程中使用数组
数组的定义
Dim MyArray
MyArray = Array(1,5,123,12,98)

可扩展数组
Dim MyArray()
for i = 0 to 10
ReDim Preserve MyArray(i)
MyArray(i)=i
next

将一个字符串分割并返回分割结果的数组
Dim MyArray
MyArray = Split(tempcnt,chr(13)&chr(10))
For I = Lbound(MyArray) to Ubound(MyArray)
Response.Write MyArray(I) & "<br>"
Next

数组排序函数
function..Sort(ary)
KeepChecking = TRUE
Do Until KeepChecking = FALSE
KeepChecking = FALSE
...

阅读全文…

ASP只有一种数据类型那就是variant

[ 2006-05-27 11:10:17 | 作者: admin ]
ASP只有一种数据类型那就是"variant "。它是一种特殊的数据类型能够根据它
的使用表示很多不同种类的信息。因为它是ASP中唯一的数据类型,它也是ASP中所有
函数返回值的唯一类型。它很简单的,"variant"数据类型能够表示数字或者是字符串
。当你在ASP程序中把它当做是数字,它就自动转化为"Numeric",如果用它为字符串,
它也同样就是"String"了。也就是说,程序中某个数据看起来好像是数字时,ASP就会
猜测它是数字,然后就用最适合数字的方法来处理。相似的,字符串处理也是如此的。
当然,您也可以把数字当做字符串来处理,所需的只是一个" "(引号)而已。Variant
图表类型:除去这些简单的数字和符号类型,"variant"还能更加清楚地表示一些特殊
的数字类型。比如,你能用表示日期(时间)的数字信息。当你用到时间或日期数据时,
所用的变量就表示时间(日期)了。当然,你能够拥有非常丰富的数字信息,
...

阅读全文…
设置php的配置文件
到php的官网查了一下php.ini的资料http://www.php.net/configuration

php.ini is searched in these locations (in order):

SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)

The PHPRC environment variable
...

阅读全文…

如何消除网页的javascript错误提示

[ 2006-05-24 16:47:25 | 作者: admin ]
<SCRIPT LANGUAGE="JavaScript">
<!--
function HideErrors() {
return true;
}

window.onerror = HideErrors;
// -->
</SCRIPT>

原创日志 一个asp类的模板

[ 2006-05-24 12:32:33 | 作者: admin ]
总重复的写,干脆写个模板,copy方便点

<%
Class MyClass

  '************************************
  '申明私有和公有变量
  '************************************
  
  Private x
  'public y
  
  
  '************************************
  '定义属性部分
  '************************************
  
  '设置属性
  Public Property Let myX(xValue)
    x=xValue
  End Property
  
  '获取属性
  Public Property Get myX
    myX=x
  End Property
  

  '************************************
...

阅读全文…

php在线参考

[ 2006-05-22 22:23:21 | 作者: admin ]
php模块化编程
http://mod.pclib.com/html/view/Channel_1.html

强烈推荐的php相关中文在线手册
http://pclib.com/
/online/Apache2.2中文手册
/online/php5中文手册
/online/mysql3.23.7-alpha中文手册
/online/mysql4.1.0-alpha中文手册
/online/mysql5中文手册
/online/php5中文手册(请使用UTF-8编码)
/online/adodb中文手册
/online/smarty中文手册
/online/cvs中文手册
/online/Hibernate-v3中文手册
/online/Css2中文手册
/online/python v2.4中文手册

FCS参考
http://blog.liu21st.com/
...

阅读全文…