ASP长文章内容自动分页函数
<%
Const maxPagesize=1000 '设置分页字数
Function InsertPageBreak(strText)
Dim strPagebreak,s,ss
Dim i,IsCount,c,iCount,strTemp,Temp_String,Temp_Array
strPagebreak="[hiweb_break]"
s=strText
If Len(s)<maxPagesize Then
InsertPageBreak=s
End If
s=Replace(s, strPagebreak, "")
s=Replace(s, " ", "< >")
s=Replace(s, ">", "<>>")
s=Replace(s, "<", "<<>")
s=Replace(s, """, "<">")
s=Replace(s, "'", "<'>")
If s<>"" and maxPagesize<>0 and InStr(1,s,strPagebreak)=0 then
IsCount=True
Temp_String=""
For i= 1 To Len(s)
c=Mid(s,i,1)
If c="<" Then
IsCount=False
ElseIf c=">" Then
IsCount=True
Else
If IsCount=True Then
If Abs(Asc(c))>255 Then
iCount=iCount+2
Else
iCount=iCount+1
End If
If iCount>=maxPagesize And i<Len(s) Then
strTemp=Left(s,i)
If CheckPagination(strTemp,"table|a|b>|i>|strong|div|span") then
Temp_String=Temp_String & Trim(CStr(i)) & ","
iCount=0
End If
End If
End If
End If
Next
If Len(Temp_String)>1 Then Temp_String=Left(Temp_String,Len(Temp_String)-1)
Temp_Array=Split(Temp_String,",")
For i = UBound(Temp_Array) To LBound(Temp_Array) S
相关文档:
<%
Const New_img=10
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from 0791idc_Product order by ID"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<div align='center' id='demo' style='o ......
IIS默认的错误页是很不友好的,很多人看到默认的错误页时都会说:网站打不开了!白白损失了这部分流量。而如果错误页直接跳转到首页又对搜索引擎很不友好,搞不好首页还会被封掉。所以根据情况,有两个方法解决这个问题:
如果是博客等内容型的网站,可以返回一个带有404错误的搜索框让访客搜索,若是电子商务型网站 ......
使用Dreamweaver测试连接成功,但是IIS里面运行却总是错误百出,看了下面这篇博文问题才得以解决、、、
一般情况下asp可以正常运行,但只要连接数据库就提示,Microsoft JET Database Engine 错误
'80004005',我的电脑因为用批处理清理文件,所以不能运行了, 只
1.查看数据库连接语句没有发现错误;
2.查看文件夹的权限已 ......
ASP生成静态网页的多种方法
收藏
使用FSO生成
<%
'使用FSO生成
Set fs = CreateObject("Scripting.FileSystemObject")
NewFile=Server.MapPath("ud03/fso.htm")
'新建 ......